Updated couchapp for cloudant