More repository refactoring.