added new functionality and comments.

Need to figure out how to npm publish
without including all of docs???