Added comments to code explaining what the script/function does