Update simplifyPoly and buildCGS_rec