diff --git a/src/FreqWindow.cpp b/src/FreqWindow.cpp
index f5d3ed798..6729bc1d5 100644
--- a/src/FreqWindow.cpp
+++ b/src/FreqWindow.cpp
@@ -292,7 +292,7 @@ FrequencyPlotDialog::FrequencyPlotDialog(wxWindow * parent, wxWindowID id,
       S.StartVerticalLay(2);
       {
          vRuler = safenew RulerPanel(
-            this, wxID_ANY, wxVERTICAL,
+            S.GetParent(), wxID_ANY, wxVERTICAL,
             wxSize{ 100, 100 }, // Ruler can't handle small sizes
             RulerPanel::Range{ 0.0, -dBRange },
             Ruler::LinearDBFormat,
@@ -310,7 +310,7 @@ FrequencyPlotDialog::FrequencyPlotDialog(wxWindow * parent, wxWindowID id,
       }
       S.EndVerticalLay();
 
-      mFreqPlot = safenew FreqPlot(this, wxID_ANY);
+      mFreqPlot = safenew FreqPlot(S.GetParent(), wxID_ANY);
       S.Prop(1)
          .Position(wxEXPAND)
          .MinSize( { wxDefaultCoord, FREQ_WINDOW_HEIGHT } )
@@ -320,7 +320,7 @@ FrequencyPlotDialog::FrequencyPlotDialog(wxWindow * parent, wxWindowID id,
       {
          S.StartVerticalLay();
          {
-            mPanScroller = safenew wxScrollBar(this, FreqPanScrollerID,
+            mPanScroller = safenew wxScrollBar(S.GetParent(), FreqPanScrollerID,
                wxDefaultPosition, wxDefaultSize, wxSB_VERTICAL);
 #if wxUSE_ACCESSIBILITY
             // so that name can be set on a standard control
@@ -336,13 +336,13 @@ FrequencyPlotDialog::FrequencyPlotDialog(wxWindow * parent, wxWindowID id,
 
          S.StartVerticalLay();
          {
-            wxStaticBitmap *zi = safenew wxStaticBitmap(this, wxID_ANY, wxBitmap(ZoomIn));
+            wxStaticBitmap *zi = safenew wxStaticBitmap(S.GetParent(), wxID_ANY, wxBitmap(ZoomIn));
             S.Position(wxALIGN_CENTER)
                .AddWindow(zi);
 
             S.AddSpace(5);
 
-            mZoomSlider = safenew wxSliderWrapper(this, FreqZoomSliderID, 100, 1, 100,
+            mZoomSlider = safenew wxSliderWrapper(S.GetParent(), FreqZoomSliderID, 100, 1, 100,
                wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL);
             S.Prop(1);
             S
@@ -356,7 +356,7 @@ FrequencyPlotDialog::FrequencyPlotDialog(wxWindow * parent, wxWindowID id,
 
             S.AddSpace(5);
 
-            wxStaticBitmap *zo = safenew wxStaticBitmap(this, wxID_ANY, wxBitmap(ZoomOut));
+            wxStaticBitmap *zo = safenew wxStaticBitmap(S.GetParent(), wxID_ANY, wxBitmap(ZoomOut));
             S.Position(wxALIGN_CENTER)
                .AddWindow(zo);
          }
@@ -375,7 +375,7 @@ FrequencyPlotDialog::FrequencyPlotDialog(wxWindow * parent, wxWindowID id,
       S.StartHorizontalLay(wxEXPAND, 0);
       {
          hRuler  = safenew RulerPanel(
-            this, wxID_ANY, wxHORIZONTAL,
+            S.GetParent(), wxID_ANY, wxHORIZONTAL,
             wxSize{ 100, 100 }, // Ruler can't handle small sizes
             RulerPanel::Range{ 10, 20000 },
             Ruler::RealFormat,
@@ -508,7 +508,7 @@ FrequencyPlotDialog::FrequencyPlotDialog(wxWindow * parent, wxWindowID id,
 
    S.AddSpace(5);
 
-   mProgress = safenew FreqGauge(this, wxID_ANY); //, wxST_SIZEGRIP);
+   mProgress = safenew FreqGauge(S.GetParent(), wxID_ANY); //, wxST_SIZEGRIP);
    S.Position(wxEXPAND)
       .AddWindow(mProgress);
 
diff --git a/src/LabelDialog.cpp b/src/LabelDialog.cpp
index 22a6031a3..e84688d81 100644
--- a/src/LabelDialog.cpp
+++ b/src/LabelDialog.cpp
@@ -255,7 +255,7 @@ void LabelDialog::PopulateOrExchange( ShuttleGui & S )
    {
       S.StartVerticalLay(wxEXPAND,1);
       {
-         mGrid = safenew Grid(this, wxID_ANY);
+         mGrid = safenew Grid(S.GetParent(), wxID_ANY);
          S.Prop(1).AddWindow( mGrid );
       }
       S.EndVerticalLay();
diff --git a/src/effects/Equalization.cpp b/src/effects/Equalization.cpp
index 7b26b5e47..fa609b651 100644
--- a/src/effects/Equalization.cpp
+++ b/src/effects/Equalization.cpp
@@ -725,8 +725,6 @@ bool EffectEqualization::CloseUI()
 
 void EffectEqualization::PopulateOrExchange(ShuttleGui & S)
 {
-   wxWindow *const parent = S.GetParent();
-
    //LoadCurves();
 
    auto trackList = inputTracks();
@@ -770,7 +768,7 @@ void EffectEqualization::PopulateOrExchange(ShuttleGui & S)
          S.StartVerticalLay(wxEXPAND, 1);
          {
             mdBRuler = safenew RulerPanel(
-               parent, wxID_ANY, wxVERTICAL,
+               S.GetParent(), wxID_ANY, wxVERTICAL,
                wxSize{ 100, 100 }, // Ruler can't handle small sizes
                RulerPanel::Range{ 60.0, -120.0 },
                Ruler::LinearDBFormat,
@@ -789,7 +787,7 @@ void EffectEqualization::PopulateOrExchange(ShuttleGui & S)
          }
          S.EndVerticalLay();
 
-         mPanel = safenew EqualizationPanel(parent, wxID_ANY, this);
+         mPanel = safenew EqualizationPanel(S.GetParent(), wxID_ANY, this);
          S.Prop(1)
             .Position(wxEXPAND)
             .MinSize( { wxDefaultCoord, wxDefaultCoord } )
@@ -827,7 +825,7 @@ void EffectEqualization::PopulateOrExchange(ShuttleGui & S)
          S.AddSpace(1, 1);
 
          mFreqRuler  = safenew RulerPanel(
-            parent, wxID_ANY, wxHORIZONTAL,
+            S.GetParent(), wxID_ANY, wxHORIZONTAL,
             wxSize{ 100, 100 }, // Ruler can't handle small sizes
             RulerPanel::Range{ mLoFreq, mHiFreq },
             Ruler::IntFormat,
diff --git a/src/effects/Equalization.h b/src/effects/Equalization.h
index 4a38f522d..a71e40ca0 100644
--- a/src/effects/Equalization.h
+++ b/src/effects/Equalization.h
@@ -263,7 +263,7 @@ private:
    wxSizerItem *mLeftSpacer;
 
    EqualizationPanel *mPanel;
-   wxPanel *mGraphicPanel;
+   //wxPanel *mGraphicPanel;
    wxRadioButton *mDraw;
    wxRadioButton *mGraphic;
    wxCheckBox *mLinFreq;
diff --git a/src/effects/ScienFilter.cpp b/src/effects/ScienFilter.cpp
index ce1e44d6b..09acac3b3 100644
--- a/src/effects/ScienFilter.cpp
+++ b/src/effects/ScienFilter.cpp
@@ -359,8 +359,6 @@ bool EffectScienFilter::Init()
 
 void EffectScienFilter::PopulateOrExchange(ShuttleGui & S)
 {
-   wxWindow *const parent = S.GetParent();
-
    S.AddSpace(5);
    S.SetSizerProportion(1);
    S.StartMultiColumn(3, wxEXPAND);
@@ -375,7 +373,7 @@ void EffectScienFilter::PopulateOrExchange(ShuttleGui & S)
       S.StartVerticalLay();
       {
          mdBRuler = safenew RulerPanel(
-            parent, wxID_ANY, wxVERTICAL,
+            S.GetParent(), wxID_ANY, wxVERTICAL,
             wxSize{ 100, 100 }, // Ruler can't handle small sizes
             RulerPanel::Range{ 30.0, -120.0 },
             Ruler::LinearDBFormat,
@@ -394,7 +392,7 @@ void EffectScienFilter::PopulateOrExchange(ShuttleGui & S)
       S.EndVerticalLay();
 
       mPanel = safenew EffectScienFilterPanel(
-         parent, wxID_ANY,
+         S.GetParent(), wxID_ANY,
          this, mLoFreq, mNyquist
       );
 
@@ -432,8 +430,8 @@ void EffectScienFilter::PopulateOrExchange(ShuttleGui & S)
 
       S.AddSpace(1, 1);
 
-      mfreqRuler  = safenew RulerPanel(
-         parent, wxID_ANY, wxHORIZONTAL,
+      mfreqRuler = safenew RulerPanel(
+         S.GetParent(), wxID_ANY, wxHORIZONTAL,
          wxSize{ 100, 100 }, // Ruler can't handle small sizes
          RulerPanel::Range{ mLoFreq, mNyquist },
          Ruler::IntFormat,
diff --git a/src/prefs/PrefsDialog.cpp b/src/prefs/PrefsDialog.cpp
index 26ac6b555..a72fe325d 100644
--- a/src/prefs/PrefsDialog.cpp
+++ b/src/prefs/PrefsDialog.cpp
@@ -551,7 +551,7 @@ PrefsDialog::PrefsDialog
    {
       wxASSERT(factories.size() > 0);
       if (!uniquePage) {
-         mCategories = safenew wxTreebookExt(this, wxID_ANY, mTitlePrefix);
+         mCategories = safenew wxTreebookExt(S.GetParent(), wxID_ANY, mTitlePrefix);
 #if wxUSE_ACCESSIBILITY
          // so that name can be set on a standard control
          mCategories->GetTreeCtrl()->SetAccessible(
@@ -602,7 +602,7 @@ PrefsDialog::PrefsDialog
          // Unique page, don't show the factory
          const PrefsNode &node = factories[0];
          const PrefsPanel::Factory &factory = node.factory;
-         mUniquePage = factory(this, wxID_ANY);
+         mUniquePage = factory(S.GetParent(), wxID_ANY);
          wxWindow * uniquePageWindow = S.Prop(1)
             .Position(wxEXPAND)
             .AddWindow(mUniquePage);
diff --git a/src/tracks/labeltrack/ui/LabelTrackControls.cpp b/src/tracks/labeltrack/ui/LabelTrackControls.cpp
index f522e8260..ed08dd0ba 100644
--- a/src/tracks/labeltrack/ui/LabelTrackControls.cpp
+++ b/src/tracks/labeltrack/ui/LabelTrackControls.cpp
@@ -125,7 +125,7 @@ void LabelTrackMenuTable::OnSetFont(wxCommandEvent &)
 
          /* i18n-hint: (noun) The name of the typeface*/
          S.AddPrompt(_("Face name"));
-         lb = safenew wxListBox(&dlg, wxID_ANY,
+         lb = safenew wxListBox(S.GetParent(), wxID_ANY,
             wxDefaultPosition,
             wxDefaultSize,
             facenames,
@@ -139,7 +139,7 @@ void LabelTrackMenuTable::OnSetFont(wxCommandEvent &)
 
          /* i18n-hint: (noun) The size of the typeface*/
          S.AddPrompt(_("Face size"));
-         sc = safenew wxSpinCtrl(&dlg, wxID_ANY,
+         sc = safenew wxSpinCtrl(S.GetParent(), wxID_ANY,
             wxString::Format(wxT("%ld"), fontsize),
             wxDefaultPosition,
             wxDefaultSize,
diff --git a/src/widgets/ASlider.cpp b/src/widgets/ASlider.cpp
index f424225bc..1403226df 100644
--- a/src/widgets/ASlider.cpp
+++ b/src/widgets/ASlider.cpp
@@ -283,7 +283,7 @@ SliderDialog::SliderDialog(wxWindow * parent, wxWindowID id,
       mTextCtrl = S.Validator<wxTextValidator>(wxFILTER_NUMERIC)
          .AddTextBox( {}, wxEmptyString, 15);
 
-      mSlider = safenew ASlider(this,
+      mSlider = safenew ASlider(S.GetParent(),
                             wxID_ANY,
                             title,
                             wxDefaultPosition,
diff --git a/src/widgets/HelpSystem.cpp b/src/widgets/HelpSystem.cpp
index df724f010..9e4141fe3 100644
--- a/src/widgets/HelpSystem.cpp
+++ b/src/widgets/HelpSystem.cpp
@@ -160,7 +160,7 @@ void HelpSystem::ShowHtmlText(wxWindow *pParent,
    pFrame->SetTransparent(0);
    ShuttleGui S( pWnd, eIsCreating );
 
-   wxPanel *pPan = S.Style( wxNO_BORDER | wxTAB_TRAVERSAL )
+   S.Style( wxNO_BORDER | wxTAB_TRAVERSAL )
       .Prop(true)
       .StartPanel();
    {
@@ -181,7 +181,7 @@ void HelpSystem::ShowHtmlText(wxWindow *pParent,
       }
       S.EndHorizontalLay();
 
-      html = safenew LinkingHtmlWindow(pPan, wxID_ANY,
+      html = safenew LinkingHtmlWindow(S.GetParent(), wxID_ANY,
                                    wxDefaultPosition,
                                    bIsFile ? wxSize(500, 400) : wxSize(480, 240),
                                    wxHW_SCROLLBAR_AUTO | wxSUNKEN_BORDER);