Refactor repository structure.