Rearrange code for a cleaner patch.