cleanup and shuffle some things around