changed innerhtml to textcontent, rm preproccess, rm italic
whitespace rm/add, swapped ifelse for conditional