Fixed some of the tests that were broken by the recent refactoring.