refactor couchdb settings