First implementation

For review
(after reading the spec) so I see. I'm a bit surprised, but it does keep things simple.