Rearrange and clean up formatting.