more refactoring to clean up the project