redid mapWriter for XMLTool + comments