Refactored the repository.