NGI_pipeline working version

It is still under testing but it should be pretty stable: @mario please review it carefully
I see this statement in 4 different places in this PR. Wouldn't it be better to add a decorator ```@with_config``` or something similar instead of rewriting this little peace of code again and again?