Cleanup operation for TED.