Added some comments to JS helper