Removing Default Windows

I have created my own gold window with the code below which works perfectly.

The only thing is that the original gold window is still visible as well. As Shown in image below.

How would I go about removing the original window? Its something in the rpg_scenes.js right?

SceenShotGoldWindow.PNG


My Code:
Code:
(function() {
    var _Scene_Menu_start = Scene_Menu.prototype.start;
    Scene_Menu.prototype.start = function() {
        _Scene_Menu_start.call(this);
        this._UICGoldWin = new UIC_goldWindow(30, 100);
        this.addWindow(this._UICGoldWin);
    };
    function UIC_goldWindow() {
        this.initialize.apply(this, arguments);
    };
    UIC_goldWindow.prototype = Object.create(Window_Base.prototype);
    UIC_goldWindow.prototype.constructor = UIC_goldWindow;
    UIC_goldWindow.prototype.initialize = function(x, y) {
        Window_Base.prototype.initialize.call(this, x, y, this.windowWidth(), this.windowHeight());
        this.refresh();
    };
    UIC_goldWindow.prototype.refresh = function() {
        this.contents.clear();
        this.drawIcon(313, 0, 0);
        this.drawText($gameParty.gold(), Window_Base._iconWidth + 8, 0, this.windowHeight(), this.windowWidth() - (Window_Base._iconWidth + 8), 'left');
    }
    UIC_goldWindow.prototype.windowWidth = function() {
        return 250;
    }
    UIC_goldWindow.prototype.windowHeight = function() {
        return this.fittingHeight(1);
    }
})();
I figured I would update this and let you all know I figured it out. I basically made an overwrite of the Scene menu and just not adding the gold window to it. Here is the solution I found. Maybe someone knows of a better way.


Code:
(function() {
    var _Scene_Menu_start = Scene_Menu.prototype.start;
    Scene_Menu.prototype.start = function() {
        _Scene_Menu_start.call(this);
        this._UICGoldWin = new UIC_goldWindow(30, 100);
        this.addWindow(this._UICGoldWin);
    };
    function UIC_goldWindow() {
        this.initialize.apply(this, arguments);
    };
    UIC_goldWindow.prototype = Object.create(Window_Base.prototype);
    UIC_goldWindow.prototype.constructor = UIC_goldWindow;
    UIC_goldWindow.prototype.initialize = function(x, y) {
        Window_Base.prototype.initialize.call(this, x, y, this.windowWidth(), this.windowHeight());
        this.refresh();
    };
    UIC_goldWindow.prototype.refresh = function() {
        this.contents.clear();
        this.drawIcon(313, 0, 0);
        this.drawText($gameParty.gold(), Window_Base._iconWidth + 8, 0, this.windowHeight(), this.windowWidth() - (Window_Base._iconWidth + 8), 'left');
    }
    UIC_goldWindow.prototype.windowWidth = function() {
        return 250;
    }
    UIC_goldWindow.prototype.windowHeight = function() {
        return this.fittingHeight(1);
    }
  Scene_Menu.prototype.create = function() {
    Scene_MenuBase.prototype.create.call(this);
    this.createCommandWindow();
    this.createStatusWindow();
  };
})();

Original thread: https://forums.rpgmakerweb.com/threads/removing-default-windows.78453/