Added some common luaex code.