Added methods for setting residue and modulus.

Untested, should begin to implement some unit_testing script.