Some code improvements, fixed cause of heading-dependent error.
Some more lines in this plot.