Added primality test.