Remove the delegated icon in destroy method

The delegated icon is now removed in the destroy method + little code cleaning.