Added PrimeFactors to pe12

Also optimzed the code from the sample I had previously
Fixed corner case in primesTo