tidied up couchbase implementation, added teardown of data, birthed code from unit tests