Refactor Part I: moving caches to SimuState implementations.