Separated the main into its own class, made buttons and menu items more consistent with state.