Test generator refactoring.
More test generator refactoring.
More refactoring.