Slight re-org of test code