more refactoring and project structure clean up