Update install.sh, greatly increase functionality.

Also allow for easier extension in the future.