Merge statistics updates into v3.0
Created by: femtobit
It appears that for some reason (probably related to this?) the changes to the statistics of #383 are not all present in the current v3.0
branch.
So let's try this again.
(This also resolves #384 (closed).)