NGI_pipeline working version

It is still under testing but it should be pretty stable: @mario please review it carefully
I think it does but not until you close the file a few lines later