Added algorithms for calculating the GCD