Refactor done, class stat has been created
//TODO .. more test, refactoring.