Added flags to make couchdb optional