Some work to improve the unit test situation. However, this is not finished.