Adding JSDOC for API documentation