Further improvements to factorization.