Remove the delegated icon in destroy method

The delegated icon is now removed in the destroy method + little code cleaning.

REMARK : this commit here is not cumulative to my other pull requests, however I did merge this change on the elementTooltip branch and fixed the resulting conflict at the same time. I suggest you pull my other pull request and disregard this one.