CG code cleanup and initial TRON master task