Added serialization code for lines and planes.