Refactoring repo