Main body of the script