Added some comments to js