Refactored primes.py as tools.py. Added gcd to tools.