Initial work on tests.  WIP.