Refactor for statistics design