removed unnecessary variables from rshift
exponentiation
mod reduce and test additions