Rearrange for better merging