Improved the pie chart and incapsulated it in the controller.