Factoring is uncommented and logically bug tested, but still not
working. Found that subtract is messing it up in line 313 while
debugging.