Fix <th> bug. Cleanup