Bug fixes to persistence layer and updated documentation.
Bug fixes
Minor fixes.