Refactor, as if core didn't have enough to do already

We're going to have to take some stuff out of core soon, but I don't
know what...