Move parsing the sort parameter out of createStrategy