Further improvements to factor-finding
- now uses sqrt(n)+1 as upper limit