Refactored repository.