cleanup and jsdoc