BugFix: Implemented IDisposable
Added debug mode