Cleanup and bugfix in Debugger class;