Add jsdoc for some internals