added method to handle close menu item, as well as defined the controller used by the FXML file