Quite a bit of test cleanup