improve code
remove unused imports
implement IDisposable interface