Improved DebugConnection, added some comments