Removing references to wndMain.