Initial implementation and spec tests.