perf: fix event validation for software group leaders
clean up
some optimizations(szezso)
some fixes from 3.4.y