Rename variables for clarity; stop iterating candidates after square is greater than upper bound.
No need to set variable outside loop any more.
Range is only being used in one place, so remove.
Go all the way up to upper bound.
No need for fancy candidate/prime parsing when we've hit a set number of primes.
Have the runner run the Erastothenes.
Simplify another method that's not being reused.