isPrime function improved. Added a recursive and an iterative version of gcd function.