Some changes that made the script run more smoothly / robustly.  Not really relevant.