Sortable table columns

Added the ability to sort when clicking on table headers.