A load of refactoring to get the tests to run locally in my IDE's debugger