tidied up install script