Refractor text_list_to_html, removed unnecessary functions
Added comments