Add tests

Also fix some other tests which were missed in 3f29