Initial code and tests.