another pass at parsing functions into js doc
allow fetching with startkey/endkey. delete old code.