Rework data structures to be easier on memory.