Some refinements to build.sh