Change all occurences of plain sort() to std::sort()