Added comments to better document the script