Quick refactor to better encapsulate logic, permit multiple plots.