Finished refactoring dataPlot according to some of luke's suggestions.