Second intermediate commit.
More screwed-up stuff pending.