Get rid of unneccassary objects.
Implemented the out-of-range cache stack to reduce memory reallocation again.