Misc AVM1 fixes

Mostly created to support loadVariables. It was the time to refactors AVM1 events too.