CR changes, including error handling and initialization of new stats struct usage.