Use BTreeSet instead of TreeSet.
Merge pull request #243 from serpis/use_btreeset

Use BTreeSet instead of TreeSet.