Converted some global variables to local ones in InterfaceLogevents