massive bug fixes to code base. introduced couchbase 2.0 client