Cleanup of test code