Added an explanatory comment
Initial version of event handling