refactored classes and dirs