Hmm i will try to optimize the latest version of the map teun sent me and i will send it to you so you can see what i replaced.
Here is what i think should get replaced:
1.UnitIndexing for AutoIndex
2.StunSystem for UnitStatus
3.Adding BonusMod instead of unit properties maybe? /just a suggestion.
4.ItemEQ/ItemUnEQ library, the first of those long if/then/else branches could get replaced by 1 preseted array for defining what item type id is which number and then simply use it in further comparison. It would decrease the amount of If/then/else calls drastically.
5.Why are you using HandleData when you could use 1 hashtable instead?
6.Boolexpr Utils are uselles now, boolexpr no longer leaks when null. At least when using RegisterAnyUnitEventBJ().
7.GroupEnumUnitsInCone() function could operate on x,y and radians instead of taking a location and using CosBJ/SinBJ.
I thought i would find more things to improve but everything else looks clean, you did a good job.