public MasterFrame(Account a, LoginScreen ls) {
	// Initialize components.
	this.a          = a;
	login_screen    = ls;
	top_panel       = new JPanel();
	logout_button   = new JButton("Logout");
	back_button     = new JButton("Back");
	settings_button = new JButton("Settings");
	role_label      = new JLabel();  // Changes according to `a`.
	pages           = new LinkedList<MSPanel>();

	// Various settings.
	setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
	//	setResizable(false);
	setSize(700,700);
	//	setLayout(new GridLayout(2,1));
        back_button.setEnabled(false);  //Grey back button initially
	//Set shark image icon
        setIconImage(new ImageIcon(getClass()
				   .getResource("markshark-1x.png")).getImage());

	// Dynamic display of Landing Page, Role, etc.
	if (a.getAccountType() == Account.Type.ACADEMICADMIN) {
	    role_label.setText("Role: Academic Administrator");
	    curr_page = new LandingPageAdmin((AcademicAdmin)a);
	} else if (a.getAccountType() == Account.Type.ASSISTANTADMIN) {
	    role_label.setText("Role: Assistant Academic Administrator");
	    curr_page = new LandingPageAssistAdmin((AssistantAdmin)a);
	} else if (a.getAccountType() == Account.Type.INSTRUCTOR) {
	    role_label.setText("Role: Instructor");
	    curr_page = new LandingPageInstructor((Instructor)a);
	} else if (a.getAccountType() == Account.Type.SYSTEMADMIN) {
	    role_label.setText("Role: System Administrator");
	    curr_page = new LandingPageSysAdmin((SystemAdmin)a);
	} else if (a.getAccountType() == Account.Type.TATMMARKER) {
	    role_label.setText("Role: TA/TM");
	    curr_page = new LandingPageTA((TATM)a);
	} else {
	    System.out.println("Unknown account type!! Everyone overboard!! Eject!!");
	    curr_page = null;  // omg please no.
	}

	// Set up action listeners
	back_button.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
		    goBackAction(e);
		}
	    });
	
	logout_button.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
		    logoutAction(e);
		}
	    });

	settings_button.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
		    settingsAction(e);
		}
	    });

	// Set up persistent top bar
	top_panel.setLayout(new GridBagLayout());
	c.gridx = 1;
	c.gridy = 0;
	c.weightx = 1.0;
	//	c.weighty = 1.0;
	c.anchor = GridBagConstraints.NORTHEAST;
	top_panel.add(role_label, c);

	c.gridx = 0;
	c.gridy = 1;
	c.weighty = 1.0;
	c.weightx = 0;
	c.anchor = GridBagConstraints.WEST;
	top_panel.add(back_button, c);

	c.gridx = 1;
	c.weighty = 0;
	c.weightx = 0;
	c.anchor = GridBagConstraints.CENTER;
	top_panel.add(settings_button, c);

	c.gridx = 2;
	c.gridy = 1;
	c.anchor = GridBagConstraints.EAST;
	c.weightx = 1.0;
	c.weighty = 1.0;
	top_panel.add(logout_button, c);

	// MasterFrame Layout Settings
	setLayout(new GridBagLayout());
	c = new GridBagConstraints();
	c.gridx = 0;
	c.gridy = 0;
	c.ipady = 50;
	c.weightx = 1.0;
	add(top_panel, c);

	// Constraints for all bottom panels ever.
	c.gridy = 1;
	//	c.ipady = 100;
	c.weighty = 1.0;
	c.gridwidth = 10;
	add(curr_page, c);

	// Render the Frame
	setTitle("MarkShark Grading System - " + curr_page.getPanelTitle());
	setLocationRelativeTo(null);
	pack();
    }