Event generation modified to avoid duplicate entries for event. Event 
status clear implemented.