I've been having a look at this example a bit, and am wondering what exactly do lines 30 through 170 do?
It seems to work just fine if I remove that whole chunk of code.
Ah, I see.
It only works without that first chunk of code if you've already ran the full program before deleting those lines.
From a fresh boot, skipping lines 30-170 gives an error.