Refactor HTML tag removal
Clean up HTML encoding