StatsPlugin code factoring
Creation of a function xml instead of a hack for  Nokogiri::XML