Tweak comparator
Remove "ugly hack"
Dont sort after output when dataset is too large