Added mainFrameListener and will switch out panes