Major refactoring on the test runner