Fixes #21, #23, #24, #25
Resolved merge conflicts
Merge pull request #26 from couchbaselabs/api-test-issues

Fixes #21, #23, #24, #25