Modular exponentiation

Implement Modular exponentiation.