Reduce redundancy in the Build script