Regression test code cleanup