Repository refactor.