Added stats generator, created piechart directive