Made prime-factors recursive and simpler.