clean up htmls and optimize