Serialization

Allows for each class to be serialized for writing to a file.