Many improvements to the build system.