refactors directory structure