refactor graph-a-tron to become a query builder, now with option to graph or export json or csv.