Added some jsdoc comments to the source