Added more comments to the js file