Fixed bug with the sorting direction not being independent for each columnin a table. It now is. Also fixed a bug with the three new tables that caused them to show an active next field when they are empty.

The last change was refactoring of how the sort direction was kept track of. It no longer uses the strings 'asc' and 'dec' to determin the order. It now uses 1 for ascending and -1 for decending.