Various micro-optimizations