More fixes to first pass on build script