BIG BIG unfinished commit.

I'll clean up this mess later, I need to work on it with somebody...
Darnit!