Some cleanup and get the tests to run properly