Intermediate commit.

Partially implemented resizing, but it's not ready yet.