Add serialization structure
finally fleshed things out. Haven't tested yet