Fixed primeFactors: the previous implementation was both inefficient (checked too many numbers) and incorrect (it returned unique prime factors, but not all prime factors. 4, for example, should return (2, 2) and not (2)).