Reorganizing Lua code.