Refactor and write more tests.
Refactor and write more tests.

vega/vega-lite,vega/vega-lite,vega/vega-lite,uwdata/vega-lite,vega/vega-lite,uwdata/vega-lite,vega/vega-lite,uwdata/vega-lite,uwdata/vega-lite,uwdata/vega-lite