Speedups for factoring
Update documentation