Disposable fixup

- Implement IDisposable interface correctly, with sealed classes where possible for simplicity.
- Add using statement around undisposed local variables.
Style nit: we tend to put the braces on the same line if the block is empty.