Added sorting capability to the stats table.