Cleaned up some code for the generation of our tests.