Refactored repo