Porting master to Couchbase