- revisions as part of overhaul to eliminate global variables.  Fixed some small bugs...