Clean up event listeners code
Description
There can be some improvements in the controllers code, e.g. add missing phpdoc params, add missing type hints, refactor long lines, refactor variable names.
Goal
Make code more readable and understandable, especially for newbies.