added filter variable to limit plots
more diagnostics added to print_diag
misc additions