Bug 831785 - Code cleanup.

Jenkins reports a gradual rotting.

Leave this open as we push new commits to it; we can merge it in one go, avoid multiple landings.