Make event delegation a set of functions