Cleanup and statistic