Moved all the cleanup stuff to test.py itself.