Time to clean up some stuff using C++ 11 I think!
Changed NULL to nullptr.