plot 3 is basically working
A bit of cleanup