Updated documentation and jsdoc comments