Sort table headings now underlined
Reordered controller logic