This is so much fun! I got my first prototype together. I reduced your code Tido just to make a real simple 3 mode light with no strobes and no programming. To access the modes, just tap the momentary switch (this is a Maglite btw) the same number of times as the mode you want to access. Tap once before fully clicking the switch in and you'll go to mode one. Tap three times before turning it on and you go to mode three. The nice thing is that the light delays turning on for 250ms. So if you just woke up in the middle of the night and don't want to have to cycle through modes, ruining your night vision, just tap once before turning on and you go to low (mode one in my case). If you almost always use the light on max, just set to max and it will always turn on at max. The nice thing is that you don't have the 2 second delay before it programs the mode like the driver comes stock. Once the light is on you know the memory is stored, so you can turn it on for a split second and then off without having it go to the next mode upon the next startup.
I just want to thank you guys again, this is a really fun little hobby.
EDIT: I thought this would really only work will with forward-clicky switches, but it could work well for reverse-clickys as well, you would have to tap 2 times once the light is on to access mode 1, 4 times for mode 3 (although you could think of 1 tap as going to the saved mode, 2 taps for the 2nd slot, etc.)