cleanup on xml writer, to deal with different naming, and remove unnecessary initialization