Changed table rendering to allow for table headers and footers