Refactoring directory setup