moved debugger code into separate class (booh)