Clean up sort switch
Reduced runtime