Improve readability

Signed-off-by: Jonas Kalderstam <jonas@kalderstam.se>
Fix equality test

Signed-off-by: Jonas Kalderstam <jonas@kalderstam.se>
convert events variable to array. This fixes the failing test

Signed-off-by: Jonas Kalderstam <jonas@kalderstam.se>