cleanup and some more tests