Changed exponentiation non-modulo to use unsigned long