Clean up legacy test code