Added improved error handling to PersistenceJS. First tests of HTML export of documentation.