Fix lots of broken unit tests.