Starting to clean up the script.