Simplified TestCase cleanup code