Updated documentation and changed to jsdoc