Update to new couchdb interface