Added naive implementation of GCD.