Fix up the build scripts

Now the modules are isolated and everything installs properly.

Bad build scripts make me really, really angry so I made everything much cleaner.