more tests and cleaning up
adding jsdocs and doc to readme