Added a rudimentary unit test suite.
re #263