Moved from using mpz_t to using mpz_class internally.