Improve Lua callback system