Move test code around