Updates for PR#542

* Added comments to explain the changes.
* Updated test format to do "using" around nested scopes instead of
empty scope blocks to simulate usage that includes disposal.
Added missing format provider.