Extracted IPersistenceManager.
Minor fixes
Added  PersistanceFactory.