This is just some cleanup code, rearranging some of the checkout code where TYPECHANGE support was added and adding some comments to the diff header regarding the constants.