Refactor dispatch_sort() function
Merge pull request #324 from kylelutz/refactor-dispatch-sort

Refactor dispatch_sort() function