added pouchdb, moved files to lib folder