iterated training
Type cleanup and initial split code