refactored classes to separate files