Data layer refactorings.