Fixed simpleFactor using Groebner basis techniques.