add network.lua in lua port and minor fixes