Many changes and improvements to XML serialization.