Fix html missings tags, retab and remove trailing whitespaces.