Made matplotlib/plotting optional