Initial progress on writing some unit tests.