Added API docs with JSDOC