A lot of the base work for the rewrite.

A ton of stuff is half-implemented, but enough should be there to get
most of the ideas behind the rewrite and allow others to pitch in
*hint* *hint*

Also I'm probably crazy.