cleaning up some mess, and renaming for refactoring