More testing code cleanup