n() - get n random terms

Introduced a new function - n() which will return an array of n random terms.
Improvement in performance of unique()
Minor restructuring of code