bunch of cleanup and renaming