Refactor setExtensionIconOf method