Make tally & top_n more conistent.
Also use min_rank in top_n for speed boost