More work on the sort order dialog.