Minor fixes

 * Added jsdoc
 * Add missing space to error message