SortingAlgorithms refactoring