Teleporting, some optimizations in ScriptCompiler