Lua-mode and fixes