Serialization of classes, fixed constructor code
Merge branch 'serialization'