Tri_Convert code cleanup