Data repository refactoring