change order of args to nextPlotter to avoid flipping
removed commented out code
moved main function to driver main module