Clean up the script a lot