Added serialization methods for the element since spill/restore serialize the precomp only. 

Serialization is useful when sending the elements over the network