Refactoring optional_icons introducing a flag.