Tidying up the script.