Added gcd and isPrime methods to Loops class