Credit Andrea with many more html table fixes