Added test plot; use all lines, handle blank Bmag on ingest; clean up .c