doc - added jsdoc comments to code, modified README.md