Separate global variables and events