Basic functionality in place.

Simple ad-hoc tests, but no automated testing yet.