Removed unused event code