Refactored Debug window with small changes