Initial version with some tests.