Improved tidying of blank TH and TD