Cleanup and test generator