Implement disposable pattern where required