Regardless of how awesome this may be, I cannot get over how there are 6 (!) Levels of nesting in the code sample. I hope it's simply for the sake of keeping the sample short, but this kind of "Chevron programming" is generally hard to read.