Refactored code
Added statistics option - implemented stat option for main to do view