Refactoring repositories (finished admin)