Fixed host parameter when connecting to Couchbase.

Also, made some cleanup (pep8, whitespace) through the source code.