Refactors language_stats_helper