cleanup sortable code