Reorganized MainFrame to handle all control events with a mediator.