minor: beautification of code that inits the event listeners