Cleanup callback code