Added global variables to panel.py