Cleaning up the bottom half of the script.