Changed MainFrame to be AFrame