Added descriptive comments to js