Mass refactoring of debugger