Semi success - produces tables of the correct orientation but with some
of the HTML in the wrong place (particularly <tr> tags)