Oh, this is going to be an ugly merge.
Merged Aly's updates with my half-finished bits.