This also refactors Caching to be handled as a class instance so it can be moved as well. That still needs testing.