jsdoc and cleanup