Rerun the buildshots code and fix some bugs