Adds more unit tests
fixes unit tests (partly)