Preliminary work on --stats switch