refactor directory hierarchy