cleanup started for stat.c