First foundations

The first real code went in: a bare skeleton, nothing to look at yet, but something to build on.