Fixtests

Fixes a bunch of test issues.