My pleasure.
Remember that this program, though short, uses a lot of complex techniques such as asynchronous event handling that are guaranteed to make you wonder what's going on here. This is the unfortunate truth of programming, just as of flying an airplane: there is no such thing as an easy start. Once you lift off, it's all-out full everything at once. So I gladly be your instructor on these first flights :-P
Hoppie
(Simon: I made sure I have barf bags in reach)
PS. And if people push me enough, I will also show how you could FAA-certify this kind of stuff for real-world commercial aviation use under DO-178C, but that may take a few more postings :-P