Fixed a bug and cleaned it up
Updated the chart