Restructuring the code so it looks more like the updated resulting code in the original post of intfiction.org forum. I'm going to just copy the result in to the master branch and continue the post-by-post commits in a "prehistory" branch.
This is the story as assembled by mostlyharmless and quoted in the original post on intfiction.org. Copied 2013-06-17.