Got lcm working using gcd.