Index view table headers fix

Tables in the index view currently have no `thead` section and the table header `tr` and `th` elements are instead being placed within `tbody`. This PR will correctly place table the table row and cells within `thead` tags. `tbody` is still generated implicitly for the other table rows.