Migration from C# to Lua