Added comments to javascript