Made quite a number of changes to the auto-install script