Add more unit-test and more docstring. Also rework the is_html_accepted, still not ready yet