Fixing bugs; clarifying some code; reorganizing the "read me".