Added more support for saving fields to xml, just need to copy this code for the remaining fields