Fix the failing tests as a result of refactoring.