Factored out uniqueFactors in 69.
Don't use nub for unique elements.