Refactorings to SortingAnalysis to allow for runtime algo selection