Optimized callback registration