Finished Lua port.