Added template constructor for EventHandler