build script improvements