cleanup Lua code a bit: 'for x, _ in' is same as 'for x in'