Deserialization reimplementation [not working]
Fixed serealization/deserealization of panles and elements.