Rewriting ChartBuilder in Scala.

It's getting slow, and a conversion to async is more readable in Scala.