EventFactory class
ScriptEntity moved to its own file
Expose "Events" to scripts.