NGI_pipeline working version

It is still under testing but it should be pretty stable: @mario please review it carefully
Yeah agree. I did this originally but I'll move it to the config file.