Added xtract_stats, plus small modifications and changes xtract_data location