moved some stuff around to get around some RAM overhead with lots of large arrays open simultaneously.