Refine the build system