Fixes to the build system, some more stuff