Directory refactoring