Clean up _add_menu_actions and add unique graph ids
Fix shutdown for SIGINT and rpc requests