Refactored Couchbase backend
Merge branch 'merge'