Make a variable not global as it wasn't needed anymore. Didn't seem to fix the problem with AddEvent causing the calculator to reboot sometimes.