Redid main window, ch2 remains to be tested.