Further improvements to install script based on idea from wdjc100