Refactoring of repositories