Refactoring persistence service.