refactoring out smaller classes into new files