Cleaning up code.

Removed unused class.
Simplified program flow for drawing chart data.