Complete move to Lua