Clean up train test code