First version

The first version. Still very much a work in progress.