Fix bug where null text passed to input.
Add handling of DataContract/DataMember attributes in model.