Added comments to JS API