resolve conflicts and delete unecessary html tags