Cleaned up the couchlib.js code a bit, changed the docstrings, added optional data arguements instead of required ones. Getting it prepped to use testing framework mocha, from then on to use test driven coding.