Refactor BarChart into it's own class.