Cleaning javascript with jsdoc compliance