refactor
convert nbsp to entity at the end of processing
refactor process_text_node
entity handling
image and list handling