Add some unit tests

intermediate commit...