delete old main window code