Fixed a bunch of unit tests.