More fixes, mostly to tests.