Testable install script

* wraps main code into a function
* EnvVar-based install start
* Clean environment after install