Added default table row sorting.
Added table sorting and handling of sorted row selection.