Fix indent, whitespaces and unbalanced <tr> and <td> tags