Added PouchDB to the project and made various changes to accomodate that, as well as some minor fixes.