The table is now an instance of 'table_sql', not 'html_table'. This made sorting easy to implement, with the added benefit of taking advantage of the spout library for exporting data.