Modifying some classes to use the OnSerializing attribute to set default values.