Mostly improvements to memory management for large arrays