Adds option to delete text nodes when removing child elements

Used to avoid extra indentation/lines when switching views in task manager