gras: work on stats messages and xml formatting