Clean up callback code