Tying things together a bit.

And fixing bugs here and there.