Fix issues with IDisposable
Merge pull request #47 from sharwell/disposable-pattern

Fix issues with IDisposable