cleaned up debugger code