Cleans up some cruft.

Unless I'm missing something, this just removes cruft.

The null checks in the demos are unnecessary, as we dereference the variables earlier in the functions. (H/t FindBugs.)

The instances of "do {} while(false);" seem to be totally unnecessary.