refactoring: cleanup and restructuring