Remove unnecessary code from Modular exponentiation