Add some more tests, fix others