added a few more comments to the JS