First unit tests

I have started to add unit tests. There will be more to come, but this
should help others add their own tests.