Added comments to js file seperating areas of script and defining their purpose