Added protobuf to network library. Lots of network code changes.