Fix test failures.

I left a few needed lines out in the refactoring.