A few unit tests

Basic unit tests. More tests would be better.