Directory tree refactor