Improvements on build script