I added support for arcs in trim operation today.

I'm doing some tests to create sandboxed Lua plugins, with loadfile function. The third parameter is the global variables the file can access. The code inside the file can't access other globals, even if it's a function called outside.