Added auto-sorting to table headers