Implemented IDisposable in Unit and its dependent classes