Standardize and make generic some of the table handling in the tests.
Test refactor.
Test refactoring.
Test refactoring.