Modified so that currPrime updated properly and it wouldn't double check numbers. Working now, but almost guaranteed to be a better way to do this..