Fix warning about IDisposable

While inlining methods I noticed some classes did not implement the IDisposable interface, even though they had a Dispose method. This fixes the warning by implementing such interface.