cleaning up app.js and getting rid of cloudant