Reorganize test framework