Refactor into a class - WIP
Move global variables into class instance variables
Redraw the whole plot on window resize.

- Would be nice to maintain current brush on resize