Initial work on some unit tests