PersistenceService refactoring