Collapses some extra markup.