Overhaul MainFrame.java structure