Initial commit.

Lots of work in progress on various threads of this.