Commit of FactorMath class

There is still an error for factoring when a is more than 1