Replaced all NULLs with nullptr, other assorted c++11'fications