Further simplifying of the cache, removing redundant code.