Some more minor optimizations