Improving getLeastCommonDivisor.