Clean up callback logic.