Some work on unit tests