Initial implementation, with trivial test.