Added GCD and power functions.