Initial commit.

Builds OK but probably with many bugs and missing functionality.