massive refactoring/renaming