some more unittests and cleanup
some more unittests and cleanup