Reworking for 2.10.

An indescribable amount of suffering later, things mostly
work on 2.10.