Major overhaul, switching from localStorage to PouchDB