cleanup and some documentation

In this change set, I cleaned up the code a little and added some brief
documentation.  I found that I could get rid of the “app.js” file,
which I had intended to use to define and manage an event publishing
subsystem, but this turned out not to be necessary.