Add handling of sort options