Sorting list items by type and name.