Added Dispose functionality.