clean up generated HTML