A few edits.
Fix memory leak.

Also restore all plots.