Cleaned up debugger code