- remove invalid and unnecessary markup