fixed generating the cleaned version of the HTML text.
added DOM element counting.