A clean start!

Really, the codebase is icky enough that I'm going to attempt to
replicate all (correct, anyway) behaviour but completely rewrite the
codebase. This should be a lot more pleasant in the long run.