Move CDF construction into the util module.
Added output charts.