Fixing IDisposable Static Analysis probelm

IDisposable wasn't implemented following the Disposable pattern.