Cloudant fixes

Things I had to fix to get it working for the examples. Fixes #6 and #7.