Move the sprite and the icons to the directive
Correct some bugs with the switch