Changed MainFrame to AFrame