refactored classes and directories