Converted MainFrame to MVC