Rearranging and cleaning up