It seems the NIF flag causes failure to compile. I'll try to look at trying to fix some of this myself