Added serializing and deserializing methods to network components.