Repositories refactored