Various unit test and additions