Optimized plotter code

Removed some extraneous code.