Refactoring of persistence code - Step 2

Introduced the PersistenceManager interface and the
PersistenceManagerfactory class to allow for pluggable persistence
managers. Renamed some persistence methods for clarity. Changed all the
references. The app should still maintain the same functionality.