Fix up a whole load of build and test process