Switched to using fixed-type Python arrays for some of the cached indexes in order to hopefully save memory.