Added polynomial factorization and expansion.