Averages per worker and cleaner code