Started refactor of persistence_manager