WIP: more caching work, still not done.
WIP: pieces in place, need to work out the kinks now.