Copied over a lot of install stuff from packages. Lots needs to change.