refactor directory layout