Repositories refactoring.