Simplified Lua function handling