Some much needed speed improvements to the build script