Serialization

Now the objects can be serialized using Marshal.

In order to do this I had to convert all the Geom entities in arrays.