Improvements to build script