Updated install script to be modular and support version upgrade.