Add reference implementation and basic test setup

Uses especially for the reference implementation.

Closes #2, although as per #1 the TDD plan is not workable anymore.