Memory footprint minor optimizations