Added JSDoc annotations to the public api methods.
Added additional annotations to handle compiler warnings.