fixed up the prime factor generator, and adding a couple more tests