Better handling of globals in Lua