Add _Stats.py , Code improvements