Issue #2242361 by drunken monkey: Code cleanup, tenth batch.
Issue #2340123 by drunken monkey: Adapt to Core change for cache tags.