Abstracted the notion of events to templates