Moving sorting to options