Directories refactoring