Simplify sort option init. Remove unused code.