Refactoring some mess.
Cleaning up the pie chart mess.