add pyplot, tests, plot, clean up