renamed functions camelCase, added test for isPrime, freed P