Repository: refactoring