Added fast modular exponent, checked code quality