Add jsdoc style documentation for all functions