Reorganizing test code