Added isPrime checker.