Work in progress

Yes, this patch is getting out of hand. And no, this is not how I intend to submit it (ie: a giant pile of code)

I mostly published this here to share my current progress.