Issue #2242361 by drunken monkey: Code cleanup, ninth batch.
Adapt to newest core changes.