Rearrange and add some editing enhancements.