Changed NGNIVFunctions to the new NNIVFunctions created in Sina's Master branch