Callback code cleanup