More test code cleanup