Feature/background sync to couchdb