Fix some more details and add statistic generation script
Add statistics