refactor Lua object