Repo refactoring