more jsdoc and small fixes