Fix bug and DRY out barchart
Remove errant development code