refractored StatisticsHandle and StockHandler little bit of random work and trying to intergrate into travis-ci