More modernisations for the statistics script