cleanup some logic on what is sortable