Updated to fix some bugs, add new options, and prepare a simple regression test

Dear Andrew,
     Here's the update, as promised.

     Please reply to bruc@acm.org. --Bob