Switched getDoc out with calling couchDocument, load and getFields
couch connection moved to beginning of file