Repo refactor