Implemented my own BigInteger class to clean up code reuse