n() - get n random terms

Introduced a new function - n() which will return an array of n random terms.
Improvement in unique()
Minor restructuring of code
Maybe a `while` loop here instead?