Fixing broken tests, improving testing.