Unused caching code cleanup
More refactoring