Generate MainFrame