Updated network library. Changed network code to be stateless.