Overhaul.

Pull request for posterity. For the children.