Exception handling refinements and a couple of other minor tweaks.