Рефакторинг statistic service.