Made settings sorter possibly faster (need benchmark)