NGI_pipeline working version

It is still under testing but it should be pretty stable: @mario please review it carefully
Come on.... do not cry.... you have no idea what there was in my head when I was writing this part.... taking into account exceptions was simply too much :-)