Add cmd line opts, and option of using sorted rather than unsorted set for speed