Drop the use of global variables for user selections (and such) from dialogs. Instead set variables as attributes for the application signals.
Remove no longer used global variables