Finished GCD and LCM related functions