Fixed some issues with Couchbase storage and added tests for the storage type