Useless parentheses removed, sorting class refactored