Simplification of stats module
Merge origin/master