Further cleaned up the test code.