Fixed fermatFactor, now it's fully functional except a few unused methods in BigInteger