Added better isPrime checking and completed sumPrimes