Tidied up the scripts