some cleanup and moves