remove some explicit uses of NULL
the previous way we were defining functions in header files was problematic. Don't do that