Add minor optimizations