Fixed a boatload of unit tests.