Add an event manager

(first try)