Added specific functionality for GUI. TODO: save contents of popup menus for later load.