Sorting Update

Use C++ standard library to do the sort.