Overhaul the build system