Refactor directory hierarchy structure