Refactoring repository