Stripped out most of the global event code