Small improvements in PrimeFactorTask