diff --git a/Framework/API/src/Algorithm.cpp b/Framework/API/src/Algorithm.cpp
index 01687e116535e5f1ab4fedb890de1f2919643fd9..ec415108ecc9f2b6d818694966100f58c5511bd5 100644
--- a/Framework/API/src/Algorithm.cpp
+++ b/Framework/API/src/Algorithm.cpp
@@ -86,8 +86,8 @@ size_t Algorithm::g_execCount = 0;
 /// Constructor
 Algorithm::Algorithm()
     : PropertyManagerOwner(), m_cancel(false), m_parallelException(false),
-      m_log("Algorithm"), g_log(m_log), m_groupSize(0), m_executeAsync(NULL),
-      m_notificationCenter(NULL), m_progressObserver(NULL),
+      m_log("Algorithm"), g_log(m_log), m_groupSize(0), m_executeAsync(nullptr),
+      m_notificationCenter(nullptr), m_progressObserver(nullptr),
       m_isInitialized(false), m_isExecuted(false), m_isChildAlgorithm(false),
       m_recordHistoryForChild(false), m_alwaysStoreInADS(false),
       m_runningAsync(false), m_running(false), m_rethrow(false),
@@ -212,7 +212,7 @@ const std::vector<std::string> Algorithm::categories() const {
 
   const DeprecatedAlgorithm *depo =
       dynamic_cast<const DeprecatedAlgorithm *>(this);
-  if (depo != NULL) {
+  if (depo != nullptr) {
     res.push_back("Deprecated");
   }
   return res;
@@ -441,7 +441,7 @@ bool Algorithm::execute() {
   AlgorithmManager::Instance().notifyAlgorithmStarting(this->getAlgorithmID());
   {
     DeprecatedAlgorithm *depo = dynamic_cast<DeprecatedAlgorithm *>(this);
-    if (depo != NULL)
+    if (depo != nullptr)
       getLogger().error(depo->deprecationMsg(this));
   }
   // Start by freeing up any memory available.
diff --git a/Framework/API/src/AlgorithmProxy.cpp b/Framework/API/src/AlgorithmProxy.cpp
index 7ea45e33594c946d84f710bba3bd3b64686663c6..2c1df96eef75a5a1bdfaf6049397e457c0f71685 100644
--- a/Framework/API/src/AlgorithmProxy.cpp
+++ b/Framework/API/src/AlgorithmProxy.cpp
@@ -317,7 +317,7 @@ const std::vector<std::string> AlgorithmProxy::categories() const {
 
   const DeprecatedAlgorithm *depo =
       dynamic_cast<const DeprecatedAlgorithm *>(this);
-  if (depo != NULL) {
+  if (depo != nullptr) {
     res.push_back("Deprecated");
   }
   return res;
diff --git a/Framework/API/src/ChopperModel.cpp b/Framework/API/src/ChopperModel.cpp
index c6feabf88bb162794e48020117e87cea7601a631..d2347e791d574f2972c33378c2811cd8208be7e4 100644
--- a/Framework/API/src/ChopperModel.cpp
+++ b/Framework/API/src/ChopperModel.cpp
@@ -18,7 +18,7 @@ const char *JITTER = "JitterSigma";
 
 /// Default constructor required by the factory
 ChopperModel::ChopperModel()
-    : m_exptRun(NULL), m_angularSpeed(0.0), m_angularSpeedLog(),
+    : m_exptRun(nullptr), m_angularSpeed(0.0), m_angularSpeedLog(),
       m_jitterSigma(0.0), m_pulseVariance(0.0) {}
 
 /**
diff --git a/Framework/API/src/CompositeFunction.cpp b/Framework/API/src/CompositeFunction.cpp
index 9a9086bda8351e2f39a23bbb4bed20e4877a3d1c..4d2a10d762cd27726e4ffc5440b1a0eab9608537 100644
--- a/Framework/API/src/CompositeFunction.cpp
+++ b/Framework/API/src/CompositeFunction.cpp
@@ -73,7 +73,7 @@ std::string CompositeFunction::asString() const {
   }
   for (size_t i = 0; i < nFunctions(); i++) {
     IFunction_sptr fun = getFunction(i);
-    bool isComp = boost::dynamic_pointer_cast<CompositeFunction>(fun) != 0;
+    bool isComp = boost::dynamic_pointer_cast<CompositeFunction>(fun) != nullptr;
     if (isComp)
       ostr << '(';
     ostr << fun->asString();
diff --git a/Framework/API/src/ConstraintFactory.cpp b/Framework/API/src/ConstraintFactory.cpp
index 8500cc000b9a2b6a6be62a968a1ff0c5b9e3dde6..69184b86f97f194eeb55dcbeb9a50855b549b0ad 100644
--- a/Framework/API/src/ConstraintFactory.cpp
+++ b/Framework/API/src/ConstraintFactory.cpp
@@ -43,7 +43,7 @@ IConstraint *ConstraintFactoryImpl::createInitialized(IFunction *fun,
 IConstraint *ConstraintFactoryImpl::createInitialized(IFunction *fun,
                                                       const Expression &expr,
                                                       bool isDefault) const {
-  IConstraint *c = 0;
+  IConstraint *c = nullptr;
   if (expr.name() == "==") {
     c = createUnwrapped("BoundaryConstraint");
   } else {
diff --git a/Framework/API/src/DeprecatedAlgorithm.cpp b/Framework/API/src/DeprecatedAlgorithm.cpp
index 804e2e0ca5c0caa89d57d3944d32415fcfd7f188..3d50a0712e7f80beb1d878ccb69795c58d4b6f48 100644
--- a/Framework/API/src/DeprecatedAlgorithm.cpp
+++ b/Framework/API/src/DeprecatedAlgorithm.cpp
@@ -52,7 +52,7 @@ void DeprecatedAlgorithm::deprecatedDate(const std::string &date) {
 /// This merely prints the deprecation error for people to see.
 const std::string DeprecatedAlgorithm::deprecationMsg(const IAlgorithm *algo) {
   std::stringstream msg;
-  if (algo != NULL)
+  if (algo != nullptr)
     msg << algo->name() << " is ";
 
   msg << "deprecated";
diff --git a/Framework/API/src/ExperimentInfo.cpp b/Framework/API/src/ExperimentInfo.cpp
index 90a35d1f73f23016639ca42ea97a64646c8c3c45..2c6d88ff0b8d2ed40a5a8be83050c5e67921c103 100644
--- a/Framework/API/src/ExperimentInfo.cpp
+++ b/Framework/API/src/ExperimentInfo.cpp
@@ -1076,7 +1076,7 @@ void ExperimentInfo::setInstumentFromXML(const std::string &nxFilename,
       instr = InstrumentDataService::Instance().retrieve(instrumentNameMangled);
     } else {
       // Really create the instrument
-      instr = parser.parseXML(NULL);
+      instr = parser.parseXML(nullptr);
       // Add to data service for later retrieval
       InstrumentDataService::Instance().add(instrumentNameMangled, instr);
     }
@@ -1148,7 +1148,7 @@ void ExperimentInfo::readParameterMap(const std::string &parameterStr) {
     // if( comp_name == prev_name ) continue; this blocks reading in different
     // parameters of the same component. RNT
     // prev_name = comp_name;
-    const Geometry::IComponent *comp = NULL;
+    const Geometry::IComponent *comp = nullptr;
     if (comp_name.find("detID:") != std::string::npos) {
       int detID = atoi(comp_name.substr(6).c_str());
       comp = instr->getDetector(detID).get();
@@ -1194,7 +1194,7 @@ void ExperimentInfo::populateWithParameter(
   ParameterValue paramValue(paramInfo,
                             runData); // Defines implicit conversion operator
 
-  const std::string *pDescription = NULL;
+  const std::string *pDescription = nullptr;
   if (!paramInfo.m_description.empty())
     pDescription = &paramInfo.m_description;
 
diff --git a/Framework/API/src/FrameworkManager.cpp b/Framework/API/src/FrameworkManager.cpp
index 21c71df55840cce0f9d2c683923ae5d856716dd6..fbdb3fa41138684aac239f465ad2ccbe3dd68d18 100644
--- a/Framework/API/src/FrameworkManager.cpp
+++ b/Framework/API/src/FrameworkManager.cpp
@@ -175,7 +175,7 @@ void FrameworkManagerImpl::setGlobalLocaleToAscii() {
 
 /// Silence NeXus output
 void FrameworkManagerImpl::disableNexusOutput() {
-  NXMSetError(NULL, NexusErrorFunction);
+  NXMSetError(nullptr, NexusErrorFunction);
 }
 
 /**
diff --git a/Framework/API/src/FunctionDomain1D.cpp b/Framework/API/src/FunctionDomain1D.cpp
index bf466655d6aa17cb8f04bfd4fc5b184b239dcfde..24a79f08b4ba5ecf01422bbe996eef06908e8104 100644
--- a/Framework/API/src/FunctionDomain1D.cpp
+++ b/Framework/API/src/FunctionDomain1D.cpp
@@ -21,7 +21,7 @@ std::vector<double> FunctionDomain1D::toVector() const {
   */
 FunctionDomain1DVector::FunctionDomain1DVector(
     const std::vector<double> &xvalues)
-    : FunctionDomain1D(NULL, 0) {
+    : FunctionDomain1D(nullptr, 0) {
   if (xvalues.empty()) {
     throw std::invalid_argument("FunctionDomain1D cannot have zero size.");
   }
@@ -37,7 +37,7 @@ FunctionDomain1DVector::FunctionDomain1DVector(
 FunctionDomain1DVector::FunctionDomain1DVector(
     std::vector<double>::const_iterator from,
     std::vector<double>::const_iterator to)
-    : FunctionDomain1D(NULL, 0) {
+    : FunctionDomain1D(nullptr, 0) {
   if (from == to) {
     throw std::invalid_argument("FunctionDomain1D cannot have zero size.");
   }
@@ -56,7 +56,7 @@ FunctionDomain1DVector::FunctionDomain1DVector(
 FunctionDomain1DVector::FunctionDomain1DVector(const double startX,
                                                const double endX,
                                                const size_t n)
-    : FunctionDomain1D(NULL, 0) {
+    : FunctionDomain1D(nullptr, 0) {
   if (n == 0) {
     throw std::invalid_argument("FunctionDomain1D cannot have zero size.");
   }
@@ -77,7 +77,7 @@ FunctionDomain1DVector::FunctionDomain1DVector(const double startX,
  * @param x :: The argument value.
  */
 FunctionDomain1DVector::FunctionDomain1DVector(const double x)
-    : FunctionDomain1D(NULL, 0) {
+    : FunctionDomain1D(nullptr, 0) {
   m_X.resize(1);
   m_X[0] = x;
   resetData(&m_X[0], m_X.size());
@@ -89,7 +89,7 @@ FunctionDomain1DVector::FunctionDomain1DVector(const double x)
  */
 FunctionDomain1DVector::FunctionDomain1DVector(
     const FunctionDomain1DVector &right)
-    : FunctionDomain1D(NULL, 0) {
+    : FunctionDomain1D(nullptr, 0) {
   *this = right;
 }
 
diff --git a/Framework/API/src/FunctionDomainMD.cpp b/Framework/API/src/FunctionDomainMD.cpp
index 736ae4311695631d71abf4c9fdc472a0a367bc78..55f26e7bcc07c67bfe08d0640cb8c7f05a451cfd 100644
--- a/Framework/API/src/FunctionDomainMD.cpp
+++ b/Framework/API/src/FunctionDomainMD.cpp
@@ -58,7 +58,7 @@ const IMDIterator *FunctionDomainMD::getNextIterator() const {
   ++m_currentIndex;
   if (!m_iterator->next() || m_currentIndex >= m_size) {
     m_currentIndex = m_size;
-    return NULL;
+    return nullptr;
   }
   return m_iterator;
 }
diff --git a/Framework/API/src/IFunction.cpp b/Framework/API/src/IFunction.cpp
index e4ae61a01763abcc9fcb5557d9d2144b6bd5e28e..040dd4e8a19aed20d75c35a4ae9ec15eee261043 100644
--- a/Framework/API/src/IFunction.cpp
+++ b/Framework/API/src/IFunction.cpp
@@ -46,7 +46,7 @@ IFunction::~IFunction() {
   m_attrs.clear();
   if (m_handler) {
     delete m_handler;
-    m_handler = NULL;
+    m_handler = nullptr;
   }
 }
 
@@ -737,7 +737,7 @@ void IFunction::setMatrixWorkspace(
             // update value
             IFunctionWithLocation *testWithLocation =
                 dynamic_cast<IFunctionWithLocation *>(this);
-            if (testWithLocation == NULL ||
+            if (testWithLocation == nullptr ||
                 (fitParam.getLookUpTable().containData() == false &&
                  fitParam.getFormula().compare("") == 0)) {
               setParameter(i, fitParam.getValue());
@@ -930,7 +930,7 @@ void IFunction::convertValue(std::vector<double> &values,
     // Get l1, l2 and theta  (see also RemoveBins.calculateDetectorPosition())
     Instrument_const_sptr instrument = ws->getInstrument();
     Geometry::IComponent_const_sptr sample = instrument->getSample();
-    if (sample == NULL) {
+    if (sample == nullptr) {
       g_log.error()
           << "No sample defined instrument. Cannot convert units for function\n"
           << "Ignore convertion.";
diff --git a/Framework/API/src/IFunctionMD.cpp b/Framework/API/src/IFunctionMD.cpp
index 6eaacaedfe19bf4119467d3484ee5c61e5c893b1..3e39f22c226e9625316d5594b70a92a923864a0e 100644
--- a/Framework/API/src/IFunctionMD.cpp
+++ b/Framework/API/src/IFunctionMD.cpp
@@ -90,7 +90,7 @@ void IFunctionMD::evaluateFunction(const FunctionDomainMD &domain,
                                    FunctionValues &values) const {
   domain.reset();
   size_t i = 0;
-  for (const IMDIterator *r = domain.getNextIterator(); r != NULL;
+  for (const IMDIterator *r = domain.getNextIterator(); r != nullptr;
        r = domain.getNextIterator()) {
     this->reportProgress("Evaluating function for box " +
                          boost::lexical_cast<std::string>(i + 1));
diff --git a/Framework/API/src/ImplicitFunctionParameterParserFactory.cpp b/Framework/API/src/ImplicitFunctionParameterParserFactory.cpp
index 532499f57ee55a96559745edecbebd344001e812..ff7dc950f7bee9405f365020ee1bc7e336e4b56b 100644
--- a/Framework/API/src/ImplicitFunctionParameterParserFactory.cpp
+++ b/Framework/API/src/ImplicitFunctionParameterParserFactory.cpp
@@ -27,8 +27,8 @@ ImplicitFunctionParameterParser *ImplicitFunctionParameterParserFactoryImpl::
   }
   Poco::AutoPtr<Poco::XML::NodeList> parameters =
       parametersElement->getElementsByTagName("Parameter");
-  ImplicitFunctionParameterParser *paramParser = NULL;
-  ImplicitFunctionParameterParser *nextParser = NULL;
+  ImplicitFunctionParameterParser *paramParser = nullptr;
+  ImplicitFunctionParameterParser *nextParser = nullptr;
   for (unsigned long i = 0; i < parameters->length(); i++) {
     Poco::XML::Element *parameter =
         dynamic_cast<Poco::XML::Element *>(parameters->item(i));
@@ -37,7 +37,7 @@ ImplicitFunctionParameterParser *ImplicitFunctionParameterParserFactoryImpl::
         "Parser"; // Append parser to the name. Fixed convention
     ImplicitFunctionParameterParser *childParamParser =
         this->createUnwrapped(paramParserName);
-    if (paramParser != NULL) {
+    if (paramParser != nullptr) {
       nextParser->setSuccessorParser(childParamParser);
     } else {
       paramParser = childParamParser;
diff --git a/Framework/API/src/ImplicitFunctionParserFactory.cpp b/Framework/API/src/ImplicitFunctionParserFactory.cpp
index dda66ddd85c179263db1c720c4263a8cb2f75800..e00c3724224fcb7d1ea57f56c0c4c99f4d36d5f4 100644
--- a/Framework/API/src/ImplicitFunctionParserFactory.cpp
+++ b/Framework/API/src/ImplicitFunctionParserFactory.cpp
@@ -44,7 +44,7 @@ ImplicitFunctionParserFactoryImpl::createImplicitFunctionParserFromXML(
 
   Poco::AutoPtr<Poco::XML::NodeList> childFunctions =
       functionElement->getElementsByTagName("Function");
-  ImplicitFunctionParser *childParser = NULL;
+  ImplicitFunctionParser *childParser = nullptr;
   for (unsigned long i = 0; i < childFunctions->length(); i++) {
     Poco::XML::Node *childFunctionNode = childFunctions->item(i);
 
diff --git a/Framework/API/src/LogManager.cpp b/Framework/API/src/LogManager.cpp
index 82055f4c7de52c82d23f9074a55805f5cf9e5d09..d716b6b8d28f2a02b1cf207d8df0fa749829fb6b 100644
--- a/Framework/API/src/LogManager.cpp
+++ b/Framework/API/src/LogManager.cpp
@@ -158,7 +158,7 @@ void LogManager::splitByTime(TimeSplitterType &splitter,
                              std::vector<LogManager *> outputs) const {
   // Make a vector of managers for the splitter. Fun!
   const size_t n = outputs.size();
-  std::vector<PropertyManager *> output_managers(outputs.size(), NULL);
+  std::vector<PropertyManager *> output_managers(outputs.size(), nullptr);
   for (size_t i = 0; i < n; i++) {
     if (outputs[i]) {
       output_managers[i] = &(outputs[i]->m_manager);
diff --git a/Framework/API/src/MDGeometry.cpp b/Framework/API/src/MDGeometry.cpp
index 237af54c7e882b5c6a0fc4a4b44bff2002bd58fd..945cfde3c57e192d7b450ffb295ac137220828dd 100644
--- a/Framework/API/src/MDGeometry.cpp
+++ b/Framework/API/src/MDGeometry.cpp
@@ -382,8 +382,8 @@ void MDGeometry::transformDimensions(std::vector<double> &scaling,
   }
   // Clear the original workspace
   setOriginalWorkspace(boost::shared_ptr<Workspace>());
-  setTransformFromOriginal(NULL);
-  setTransformToOriginal(NULL);
+  setTransformFromOriginal(nullptr);
+  setTransformToOriginal(nullptr);
 }
 
 //---------------------------------------------------------------------------------------------------
diff --git a/Framework/API/src/MatrixWorkspace.cpp b/Framework/API/src/MatrixWorkspace.cpp
index 4049ce72f7c5bffb6de69adf7f2adabbd0b36182..c307fde26f4aaf106bd909eb4bdf4b2b4bdebdfe 100644
--- a/Framework/API/src/MatrixWorkspace.cpp
+++ b/Framework/API/src/MatrixWorkspace.cpp
@@ -43,7 +43,7 @@ MatrixWorkspace::MatrixWorkspace(
       m_isCommonBinsFlagSet(false), m_isCommonBinsFlag(false), m_masks(),
       m_indexCalculator(),
       m_nearestNeighboursFactory(
-          (nnFactory == NULL) ? new NearestNeighboursFactory : nnFactory),
+          (nnFactory == nullptr) ? new NearestNeighboursFactory : nnFactory),
       m_nearestNeighbours() {}
 
 MatrixWorkspace::MatrixWorkspace(const MatrixWorkspace &other)
@@ -797,7 +797,7 @@ double MatrixWorkspace::detectorSignedTwoTheta(
 
   Geometry::IComponent_const_sptr source = instrument->getSource();
   Geometry::IComponent_const_sptr sample = instrument->getSample();
-  if (source == NULL || sample == NULL) {
+  if (source == nullptr || sample == nullptr) {
     throw Kernel::Exception::InstrumentDefinitionError(
         "Instrument not sufficiently defined: failed to get source and/or "
         "sample");
@@ -827,7 +827,7 @@ double
 MatrixWorkspace::detectorTwoTheta(Geometry::IDetector_const_sptr det) const {
   Geometry::IComponent_const_sptr source = getInstrument()->getSource();
   Geometry::IComponent_const_sptr sample = getInstrument()->getSample();
-  if (source == NULL || sample == NULL) {
+  if (source == nullptr || sample == nullptr) {
     throw Kernel::Exception::InstrumentDefinitionError(
         "Instrument not sufficiently defined: failed to get source and/or "
         "sample");
@@ -1277,7 +1277,7 @@ class MWDimension : public Mantid::Geometry::IMDDimension {
 public:
   MWDimension(const Axis *axis, const std::string &dimensionId)
       : m_axis(*axis), m_dimensionId(dimensionId),
-        m_haveEdges(dynamic_cast<const BinEdgeAxis *>(&m_axis) != NULL),
+        m_haveEdges(dynamic_cast<const BinEdgeAxis *>(&m_axis) != nullptr),
         m_frame(new Geometry::GeneralFrame(m_axis.unit()->label(),
                                            m_axis.unit()->label())) {}
 
@@ -1445,7 +1445,7 @@ MatrixWorkspace::getDimension(size_t index) const {
 boost::shared_ptr<const Mantid::Geometry::IMDDimension>
 MatrixWorkspace::getDimensionWithId(std::string id) const {
   int nAxes = this->axes();
-  IMDDimension *dim = NULL;
+  IMDDimension *dim = nullptr;
   for (int i = 0; i < nAxes; i++) {
     Axis *xAxis = this->getAxis(i);
     const std::string &knownId = getDimensionIdFromAxis(i);
@@ -1454,7 +1454,7 @@ MatrixWorkspace::getDimensionWithId(std::string id) const {
       break;
     }
   }
-  if (NULL == dim) {
+  if (nullptr == dim) {
     std::string message = "Cannot find id : " + id;
     throw std::overflow_error(message);
   }
diff --git a/Framework/API/src/MatrixWorkspaceMDIterator.cpp b/Framework/API/src/MatrixWorkspaceMDIterator.cpp
index bf818a20ec115b3cfcb205bd453267d58f57d697..1ba8ded483a60d690a7bc657efaa7d9bf638572f 100644
--- a/Framework/API/src/MatrixWorkspaceMDIterator.cpp
+++ b/Framework/API/src/MatrixWorkspaceMDIterator.cpp
@@ -264,7 +264,7 @@ signal_t MatrixWorkspaceMDIterator::getInnerError(size_t /*index*/) const {
 bool MatrixWorkspaceMDIterator::getIsMasked() const {
   Mantid::Geometry::IDetector_const_sptr det =
       m_ws->getDetector(m_workspaceIndex);
-  if (det != NULL) {
+  if (det != nullptr) {
     return det->isMasked();
   } else {
     return true; // TODO. Check whether it's better to return true or false
diff --git a/Framework/API/src/ParamFunction.cpp b/Framework/API/src/ParamFunction.cpp
index 26ac60318a5cd4a13fe6f9b5ced907aae6a4e83b..a98e32dbc5f51d6a0b7f9feb8bc411c090cbf119 100644
--- a/Framework/API/src/ParamFunction.cpp
+++ b/Framework/API/src/ParamFunction.cpp
@@ -368,7 +368,7 @@ ParameterTie *ParamFunction::getTie(size_t i) const {
   if (it != m_ties.cend()) {
     return *it;
   }
-  return NULL;
+  return nullptr;
 }
 
 /** Remove all ties
@@ -415,7 +415,7 @@ IConstraint *ParamFunction::getConstraint(size_t i) const {
   if (it != m_constraints.cend()) {
     return *it;
   }
-  return NULL;
+  return nullptr;
 }
 
 /** Remove a constraint
diff --git a/Framework/API/src/Progress.cpp b/Framework/API/src/Progress.cpp
index 41160c529c441e2a47267d38c1565dc0baae616c..a995432ca22ab90b95a2138fd2d1957ce6f6ad3d 100644
--- a/Framework/API/src/Progress.cpp
+++ b/Framework/API/src/Progress.cpp
@@ -10,7 +10,7 @@ namespace API {
 /**
  * Default constructor
  */
-Progress::Progress() : ProgressBase(0.0, 0.0, 0), m_alg(NULL) {}
+Progress::Progress() : ProgressBase(0.0, 0.0, 0), m_alg(nullptr) {}
 
 /** Creates a Progress instance
     @param alg :: Algorithm reporting its progress
diff --git a/Framework/API/src/PropertyNexus.cpp b/Framework/API/src/PropertyNexus.cpp
index 02083b55ab566249967df3cf3a6b2a86558e0c5f..5add80e6c06add90bf53257095155d68cd5b4014 100644
--- a/Framework/API/src/PropertyNexus.cpp
+++ b/Framework/API/src/PropertyNexus.cpp
@@ -151,7 +151,7 @@ Property *loadProperty(::NeXus::File *file, const std::string &group) {
   }
 
   file->openData("value");
-  Property *retVal = NULL;
+  Property *retVal = nullptr;
   switch (file->getInfo().type) {
   case ::NeXus::FLOAT32:
     retVal = makeProperty<float>(file, group, times);
@@ -181,7 +181,7 @@ Property *loadProperty(::NeXus::File *file, const std::string &group) {
   case ::NeXus::INT8:
   case ::NeXus::INT16:
   case ::NeXus::UINT16:
-    retVal = NULL;
+    retVal = nullptr;
     break;
   }
 
diff --git a/Framework/API/src/Sample.cpp b/Framework/API/src/Sample.cpp
index 6f0aba1134fb46419fb66e69ee834add02338928..be462d6074e3690fee9470a7e08ea31f58e8aeba 100644
--- a/Framework/API/src/Sample.cpp
+++ b/Framework/API/src/Sample.cpp
@@ -23,7 +23,7 @@ using Geometry::ShapeFactory;
  * Default constructor. Required for cow_ptr.
  */
 Sample::Sample()
-    : m_name(), m_shape(), m_environment(), m_lattice(NULL),
+    : m_name(), m_shape(), m_environment(), m_lattice(nullptr),
       m_crystalStructure(), m_samples(), m_geom_id(0), m_thick(0.0),
       m_height(0.0), m_width(0.0) {}
 
@@ -33,7 +33,7 @@ Sample::Sample()
  */
 Sample::Sample(const Sample &copy)
     : m_name(copy.m_name), m_shape(copy.m_shape),
-      m_environment(copy.m_environment), m_lattice(NULL), m_crystalStructure(),
+      m_environment(copy.m_environment), m_lattice(nullptr), m_crystalStructure(),
       m_samples(copy.m_samples), m_geom_id(copy.m_geom_id),
       m_thick(copy.m_thick), m_height(copy.m_height), m_width(copy.m_width) {
   if (copy.m_lattice)
@@ -64,12 +64,12 @@ Sample &Sample::operator=(const Sample &rhs) {
   m_thick = rhs.m_thick;
   m_height = rhs.m_height;
   m_width = rhs.m_width;
-  if (m_lattice != NULL)
+  if (m_lattice != nullptr)
     delete m_lattice;
   if (rhs.m_lattice)
     m_lattice = new OrientedLattice(rhs.getOrientedLattice());
   else
-    m_lattice = NULL;
+    m_lattice = nullptr;
 
   m_crystalStructure.reset();
   if (rhs.hasCrystalStructure()) {
@@ -162,17 +162,17 @@ OrientedLattice &Sample::getOrientedLattice() {
  * @param latt :: A pointer to a OrientedLattice.
  */
 void Sample::setOrientedLattice(OrientedLattice *latt) {
-  if (m_lattice != NULL) {
+  if (m_lattice != nullptr) {
     delete m_lattice;
   }
-  if (latt != NULL)
+  if (latt != nullptr)
     m_lattice = new OrientedLattice(*latt);
   else
-    m_lattice = NULL;
+    m_lattice = nullptr;
 }
 
 /** @return true if the sample has an OrientedLattice  */
-bool Sample::hasOrientedLattice() const { return (m_lattice != NULL); }
+bool Sample::hasOrientedLattice() const { return (m_lattice != nullptr); }
 
 const Geometry::CrystalStructure &Sample::getCrystalStructure() const {
   if (!hasCrystalStructure()) {
@@ -397,7 +397,7 @@ int Sample::loadNexus(::NeXus::File *file, const std::string &group) {
 void Sample::clearOrientedLattice() {
   if (m_lattice) {
     delete m_lattice;
-    m_lattice = NULL;
+    m_lattice = nullptr;
   }
 }
 }
diff --git a/Framework/API/src/SpectrumDetectorMapping.cpp b/Framework/API/src/SpectrumDetectorMapping.cpp
index 11f9825e4a22b892a6acecd9565d5911eb7196b4..e54a293581ee99bd664204d4438ffb0e44944dfc 100644
--- a/Framework/API/src/SpectrumDetectorMapping.cpp
+++ b/Framework/API/src/SpectrumDetectorMapping.cpp
@@ -54,7 +54,7 @@ SpectrumDetectorMapping::SpectrumDetectorMapping(
     const specid_t *const spectrumNumbers, const detid_t *const detectorIDs,
     size_t arrayLengths)
     : m_indexIsSpecNo(true) {
-  if (spectrumNumbers == NULL || detectorIDs == NULL) {
+  if (spectrumNumbers == nullptr || detectorIDs == nullptr) {
     throw std::invalid_argument(
         "SpectrumDetectorMapping: Null array pointer passed");
   }
diff --git a/Framework/Algorithms/src/AbsorptionCorrection.cpp b/Framework/Algorithms/src/AbsorptionCorrection.cpp
index 4a3a74820a65d71ad904130f2402c85fdf81df1d..d04f005297f7182d55875c7c7dfef9646d62c425 100644
--- a/Framework/Algorithms/src/AbsorptionCorrection.cpp
+++ b/Framework/Algorithms/src/AbsorptionCorrection.cpp
@@ -21,7 +21,7 @@ using namespace API;
 using namespace Mantid::PhysicalConstants;
 
 AbsorptionCorrection::AbsorptionCorrection()
-    : API::Algorithm(), m_inputWS(), m_sampleObject(NULL), m_L1s(),
+    : API::Algorithm(), m_inputWS(), m_sampleObject(nullptr), m_L1s(),
       m_elementVolumes(), m_elementPositions(), m_numVolumeElements(0),
       m_sampleVolume(0.0), m_refAtten(0.0), m_scattering(0), n_lambda(0),
       m_xStep(0), m_emode(0), m_lambdaFixed(0.), EXPONENTIAL() {}
diff --git a/Framework/Algorithms/src/AddNote.cpp b/Framework/Algorithms/src/AddNote.cpp
index 83ab5c6e2b06bd9bf23bfefdfd2f4b0cb6dc57eb..0f045b233da8f4c97260fe43912a3b105b9dcf76 100644
--- a/Framework/Algorithms/src/AddNote.cpp
+++ b/Framework/Algorithms/src/AddNote.cpp
@@ -21,7 +21,7 @@ namespace {
  */
 void createOrUpdateValue(API::Run &run, const std::string &name,
                          const std::string &time, const std::string &value) {
-  TimeSeriesProperty<std::string> *timeSeries(NULL);
+  TimeSeriesProperty<std::string> *timeSeries(nullptr);
   if (run.hasProperty(name)) {
     timeSeries =
         dynamic_cast<TimeSeriesProperty<std::string> *>(run.getLogData(name));
diff --git a/Framework/Algorithms/src/AddTimeSeriesLog.cpp b/Framework/Algorithms/src/AddTimeSeriesLog.cpp
index b4477cd5341ad00b59a961ce6cd33205e0af517e..1d163d466fd60a2099bfbfd6e5cfb06cfa575c2b 100644
--- a/Framework/Algorithms/src/AddTimeSeriesLog.cpp
+++ b/Framework/Algorithms/src/AddTimeSeriesLog.cpp
@@ -23,7 +23,7 @@ namespace {
 template <typename T>
 void createOrUpdateValue(API::Run &run, const std::string &name,
                          const std::string &time, const T value) {
-  TimeSeriesProperty<T> *timeSeries(NULL);
+  TimeSeriesProperty<T> *timeSeries(nullptr);
   if (run.hasProperty(name)) {
     timeSeries = dynamic_cast<TimeSeriesProperty<T> *>(run.getLogData(name));
     if (!timeSeries)
diff --git a/Framework/Algorithms/src/AlignDetectors.cpp b/Framework/Algorithms/src/AlignDetectors.cpp
index f1a04f8758fe088639fa0dbf0e9744a948c7abfb..61afe41a6c9aea3a01b8bfba545b710cfcc62a45 100644
--- a/Framework/Algorithms/src/AlignDetectors.cpp
+++ b/Framework/Algorithms/src/AlignDetectors.cpp
@@ -156,7 +156,7 @@ const std::string AlignDetectors::summary() const {
 
 /// (Empty) Constructor
 AlignDetectors::AlignDetectors() : m_numberOfSpectra(0) {
-  this->tofToDmap = NULL;
+  this->tofToDmap = nullptr;
 }
 
 /// Destructor
@@ -300,7 +300,7 @@ void AlignDetectors::exec() {
   // Check if its an event workspace
   EventWorkspace_const_sptr eventW =
       boost::dynamic_pointer_cast<const EventWorkspace>(inputWS);
-  if (eventW != NULL) {
+  if (eventW != nullptr) {
     this->execEvent();
     return;
   }
diff --git a/Framework/Algorithms/src/ApplyCalibration.cpp b/Framework/Algorithms/src/ApplyCalibration.cpp
index fef0660d135c69f83cb23e5bb558d28303ff321a..416dd29a4ef708c009fcbf46f19e5eaa030f3125 100644
--- a/Framework/Algorithms/src/ApplyCalibration.cpp
+++ b/Framework/Algorithms/src/ApplyCalibration.cpp
@@ -23,7 +23,7 @@ using Geometry::IDetector_sptr;
 using Geometry::IComponent_const_sptr;
 
 /// Empty default constructor
-ApplyCalibration::ApplyCalibration() : Algorithm(), m_pmap(NULL) {}
+ApplyCalibration::ApplyCalibration() : Algorithm(), m_pmap(nullptr) {}
 
 /// Initialisation method.
 void ApplyCalibration::init() {
@@ -68,7 +68,7 @@ void ApplyCalibration::exec() {
     setDetectorPosition(instrument, detID[i], detPos[i], false);
   }
   // Ensure pointer is only valid for execution
-  m_pmap = NULL;
+  m_pmap = nullptr;
 }
 
 /**
diff --git a/Framework/Algorithms/src/BinaryOperation.cpp b/Framework/Algorithms/src/BinaryOperation.cpp
index 51766562c490fe5f7955ba8207b798214065210f..826df55543a4a0b7c10ac5d1847822ade6e04e50 100644
--- a/Framework/Algorithms/src/BinaryOperation.cpp
+++ b/Framework/Algorithms/src/BinaryOperation.cpp
@@ -28,7 +28,7 @@ BinaryOperation::BinaryOperation()
       m_matchXSize(false), m_flipSides(false), m_keepEventWorkspace(false),
       m_useHistogramForRhsEventWorkspace(false),
       m_do2D_even_for_SingleColumn_on_rhs(false), m_indicesToMask(),
-      m_progress(NULL) {}
+      m_progress(nullptr) {}
 
 BinaryOperation::~BinaryOperation() {
   if (m_progress)
diff --git a/Framework/Algorithms/src/ChangeBinOffset.cpp b/Framework/Algorithms/src/ChangeBinOffset.cpp
index be5db1d67f671863fff5df5ad90028a82d9f48e5..4b27f8138e746853dc5376c238dfac40d32e962d 100644
--- a/Framework/Algorithms/src/ChangeBinOffset.cpp
+++ b/Framework/Algorithms/src/ChangeBinOffset.cpp
@@ -19,7 +19,7 @@ DECLARE_ALGORITHM(ChangeBinOffset)
  * Default constructor
  */
 ChangeBinOffset::ChangeBinOffset()
-    : API::Algorithm(), m_progress(NULL), offset(0.), wi_min(0), wi_max(0) {}
+    : API::Algorithm(), m_progress(nullptr), offset(0.), wi_min(0), wi_max(0) {}
 
 /**
  * Destructor
@@ -92,7 +92,7 @@ void ChangeBinOffset::exec() {
   // Check if its an event workspace
   EventWorkspace_const_sptr eventWS =
       boost::dynamic_pointer_cast<const EventWorkspace>(inputW);
-  if (eventWS != NULL) {
+  if (eventWS != nullptr) {
     this->execEvent();
     return;
   }
diff --git a/Framework/Algorithms/src/ChangeTimeZero.cpp b/Framework/Algorithms/src/ChangeTimeZero.cpp
index 78a8651b507653a127725c228a9d0db969cd4f1f..3c444f183dbb681a5144d3d419486495518c4527 100644
--- a/Framework/Algorithms/src/ChangeTimeZero.cpp
+++ b/Framework/Algorithms/src/ChangeTimeZero.cpp
@@ -248,7 +248,7 @@ DateAndTime
 ChangeTimeZero::getStartTimeFromWorkspace(API::MatrixWorkspace_sptr ws) const {
   auto run = ws->run();
   // Check for the first good frame in the log
-  Mantid::Kernel::TimeSeriesProperty<double> *goodFrame = NULL;
+  Mantid::Kernel::TimeSeriesProperty<double> *goodFrame = nullptr;
   try {
     goodFrame = run.getTimeSeriesProperty<double>("proton_charge");
   } catch (std::invalid_argument) {
diff --git a/Framework/Algorithms/src/CompareWorkspaces.cpp b/Framework/Algorithms/src/CompareWorkspaces.cpp
index 1d3cfad7606d1cadb37ba84c7ea7bca63edd5abd..146cd6aab545dc2a41fb4aa8df564912f92170e6 100644
--- a/Framework/Algorithms/src/CompareWorkspaces.cpp
+++ b/Framework/Algorithms/src/CompareWorkspaces.cpp
@@ -28,7 +28,7 @@ DECLARE_ALGORITHM(CompareWorkspaces)
 /** Constructor
  */
 CompareWorkspaces::CompareWorkspaces()
-    : API::Algorithm(), m_Result(false), m_Prog(NULL),
+    : API::Algorithm(), m_Result(false), m_Prog(nullptr),
       m_ParallelComparison(true) {}
 
 //----------------------------------------------------------------------------------------------
@@ -671,8 +671,8 @@ bool CompareWorkspaces::checkAxes(API::MatrixWorkspace_const_sptr ws1,
     Unit_const_sptr ax1_unit = ax1->unit();
     Unit_const_sptr ax2_unit = ax2->unit();
 
-    if ((ax1_unit == NULL && ax2_unit != NULL) ||
-        (ax1_unit != NULL && ax2_unit == NULL) ||
+    if ((ax1_unit == nullptr && ax2_unit != nullptr) ||
+        (ax1_unit != nullptr && ax2_unit == nullptr) ||
         (ax1_unit && ax1_unit->unitID() != ax2_unit->unitID())) {
       recordMismatch(axis_name + " unit mismatch");
       return false;
diff --git a/Framework/Algorithms/src/ConvertAxisByFormula.cpp b/Framework/Algorithms/src/ConvertAxisByFormula.cpp
index 7ca2d86629a6e93fdfd086a19cc17abc42858a5f..f2ad68144d42ffb7eedfa88404dfbbdffdfbb136 100644
--- a/Framework/Algorithms/src/ConvertAxisByFormula.cpp
+++ b/Framework/Algorithms/src/ConvertAxisByFormula.cpp
@@ -107,7 +107,7 @@ void ConvertAxisByFormula::exec() {
 
   bool isRefAxis = false;
   RefAxis *refAxisPtr = dynamic_cast<RefAxis *>(axisPtr);
-  if (refAxisPtr != NULL) {
+  if (refAxisPtr != nullptr) {
     CommonBinsValidator sameBins;
     if (sameBins.isValid(outputWs) != "") {
       throw std::invalid_argument("Axes must have common bins for this "
diff --git a/Framework/Algorithms/src/ConvertUnits.cpp b/Framework/Algorithms/src/ConvertUnits.cpp
index d162fe62b96d6ef6905cdeb15127c5b534416bd8..f3393c9fcdab267a544d25efb41945322706aefe 100644
--- a/Framework/Algorithms/src/ConvertUnits.cpp
+++ b/Framework/Algorithms/src/ConvertUnits.cpp
@@ -194,7 +194,7 @@ void ConvertUnits::setupMemberVariables(
   m_distribution = inputWS->isDistribution() && !inputWS->YUnit().empty();
   // Check if its an event workspace
   m_inputEvents =
-      (boost::dynamic_pointer_cast<const EventWorkspace>(inputWS) != NULL);
+      (boost::dynamic_pointer_cast<const EventWorkspace>(inputWS) != nullptr);
 
   m_inputUnit = inputWS->getAxis(0)->unit();
   const std::string targetUnit = getPropertyValue("Target");
@@ -388,7 +388,7 @@ void ConvertUnits::convertViaTOF(Kernel::Unit_const_sptr fromUnit,
   // Get the distance between the source and the sample (assume in metres)
   IComponent_const_sptr source = instrument->getSource();
   IComponent_const_sptr sample = instrument->getSample();
-  if (source == NULL || sample == NULL) {
+  if (source == nullptr || sample == nullptr) {
     throw Exception::InstrumentDefinitionError("Instrument not sufficiently "
                                                "defined: failed to get source "
                                                "and/or sample");
diff --git a/Framework/Algorithms/src/ConvertUnitsUsingDetectorTable.cpp b/Framework/Algorithms/src/ConvertUnitsUsingDetectorTable.cpp
index 8e49a1c8b3cf41dd05cd9b089cb16e3525e003ad..7d4f6bcbe1fe740384056de92596180cc88c3f8d 100644
--- a/Framework/Algorithms/src/ConvertUnitsUsingDetectorTable.cpp
+++ b/Framework/Algorithms/src/ConvertUnitsUsingDetectorTable.cpp
@@ -204,7 +204,7 @@ void ConvertUnitsUsingDetectorTable::setupMemberVariables(
   m_distribution = inputWS->isDistribution() && !inputWS->YUnit().empty();
   // Check if its an event workspace
   m_inputEvents =
-      (boost::dynamic_pointer_cast<const EventWorkspace>(inputWS) != NULL);
+      (boost::dynamic_pointer_cast<const EventWorkspace>(inputWS) != nullptr);
 
   m_inputUnit = inputWS->getAxis(0)->unit();
   const std::string targetUnit = getPropertyValue("Target");
diff --git a/Framework/Algorithms/src/CopyDetectorMapping.cpp b/Framework/Algorithms/src/CopyDetectorMapping.cpp
index b66eba51a5a0270cd24cf64efc2f2d138ee208a4..2696e9ff5086533ce02f27017b2f24976046317c 100644
--- a/Framework/Algorithms/src/CopyDetectorMapping.cpp
+++ b/Framework/Algorithms/src/CopyDetectorMapping.cpp
@@ -48,12 +48,12 @@ std::map<std::string, std::string> CopyDetectorMapping::validateInputs() {
   // Check that the workspaces actually are MatrixWorkspaces
   bool validWorkspaces = true;
 
-  if (wsToMatch == NULL) {
+  if (wsToMatch == nullptr) {
     issues["WorkspaceToMatch"] = "Must be a MatrixWorkspace";
     validWorkspaces = false;
   }
 
-  if (wsToRemap == NULL) {
+  if (wsToRemap == nullptr) {
     issues["WorkspaceToRemap"] = "Must be a MatrixWorkspace";
     validWorkspaces = false;
   }
diff --git a/Framework/Algorithms/src/CopyInstrumentParameters.cpp b/Framework/Algorithms/src/CopyInstrumentParameters.cpp
index 61e350ee9654cdd2eb621216924f905a33944665..e265674d7d30836692637616fe28fa10a5731213 100644
--- a/Framework/Algorithms/src/CopyInstrumentParameters.cpp
+++ b/Framework/Algorithms/src/CopyInstrumentParameters.cpp
@@ -65,7 +65,7 @@ void CopyInstrumentParameters::exec() {
     for (; it != givParams.end(); it++) {
       IComponent *oldComponent = it->first;
 
-      const Geometry::IComponent *targComp = 0;
+      const Geometry::IComponent *targComp = nullptr;
 
       IDetector *pOldDet = dynamic_cast<IDetector *>(oldComponent);
       if (pOldDet) {
diff --git a/Framework/Algorithms/src/CopySample.cpp b/Framework/Algorithms/src/CopySample.cpp
index 3a14ee3bab2858c670da2e97e0f53cce27f2f7dc..668e3d2198c97c48afbfc23e8212b8bc0392919d 100644
--- a/Framework/Algorithms/src/CopySample.cpp
+++ b/Framework/Algorithms/src/CopySample.cpp
@@ -90,7 +90,7 @@ void CopySample::exec() {
   // get input sample
   IMDEventWorkspace_const_sptr inMDWS =
       boost::dynamic_pointer_cast<const IMDEventWorkspace>(inWS);
-  if (inMDWS != NULL) // it is an MD workspace
+  if (inMDWS != nullptr) // it is an MD workspace
   {
     int inputSampleNumber = getProperty("MDInputSampleNumber");
     if (inputSampleNumber < 0) {
@@ -127,7 +127,7 @@ void CopySample::exec() {
 
   IMDEventWorkspace_sptr outMDWS =
       boost::dynamic_pointer_cast<IMDEventWorkspace>(outWS);
-  if (outMDWS != NULL) {
+  if (outMDWS != nullptr) {
     int outputSampleNumber = getProperty("MDOutputSampleNumber");
     if ((outputSampleNumber == EMPTY_INT()) ||
         (outputSampleNumber < 0)) // copy to all samples
diff --git a/Framework/Algorithms/src/CorrectKiKf.cpp b/Framework/Algorithms/src/CorrectKiKf.cpp
index 44c11cb2c03d2446d3276629a2feb88b2339926d..b09eda7e12b7f034626c1767fb1218bf96558e01 100644
--- a/Framework/Algorithms/src/CorrectKiKf.cpp
+++ b/Framework/Algorithms/src/CorrectKiKf.cpp
@@ -67,7 +67,7 @@ void CorrectKiKf::exec() {
   // Check if it is an event workspace
   EventWorkspace_const_sptr eventW =
       boost::dynamic_pointer_cast<const EventWorkspace>(inputWS);
-  if (eventW != NULL) {
+  if (eventW != nullptr) {
     this->execEvent();
     return;
   }
diff --git a/Framework/Algorithms/src/CreateSampleWorkspace.cpp b/Framework/Algorithms/src/CreateSampleWorkspace.cpp
index caf599fbcf30d3250fa0c21d1ee49bb3d62104fa..9d606fe24607dc1b3f7ae37297f2b211bd283cf1 100644
--- a/Framework/Algorithms/src/CreateSampleWorkspace.cpp
+++ b/Framework/Algorithms/src/CreateSampleWorkspace.cpp
@@ -31,7 +31,7 @@ DECLARE_ALGORITHM(CreateSampleWorkspace)
 //----------------------------------------------------------------------------------------------
 /** Constructor
  */
-CreateSampleWorkspace::CreateSampleWorkspace() : m_randGen(NULL) {}
+CreateSampleWorkspace::CreateSampleWorkspace() : m_randGen(nullptr) {}
 
 //----------------------------------------------------------------------------------------------
 /** Destructor
@@ -199,7 +199,7 @@ void CreateSampleWorkspace::exec() {
   if (!m_randGen) {
     int seedValue = 0;
     if (isRandom) {
-      seedValue = static_cast<int>(std::time(0));
+      seedValue = static_cast<int>(std::time(nullptr));
     }
     m_randGen = new Kernel::MersenneTwister(seedValue);
   }
diff --git a/Framework/Algorithms/src/CreateWorkspace.cpp b/Framework/Algorithms/src/CreateWorkspace.cpp
index 9c76dfc2ed4464b77021740398913a816062add6..de359b0c4c73d8a7c66a21932039046072787dd9 100644
--- a/Framework/Algorithms/src/CreateWorkspace.cpp
+++ b/Framework/Algorithms/src/CreateWorkspace.cpp
@@ -87,7 +87,7 @@ void CreateWorkspace::exec() {
   const Property *const dataYprop = getProperty("DataY");
   const Property *const dataEprop = getProperty("DataE");
 
-  const ArrayProperty<double> *pCheck = NULL;
+  const ArrayProperty<double> *pCheck = nullptr;
 
   pCheck = dynamic_cast<const ArrayProperty<double> *>(dataXprop);
   if (!pCheck)
@@ -210,7 +210,7 @@ void CreateWorkspace::exec() {
       }
     } else {
       const size_t vAxisLength = vAxis.size();
-      NumericAxis *newAxis(NULL);
+      NumericAxis *newAxis(nullptr);
       if (vAxisLength == static_cast<size_t>(nSpec))
         newAxis = new NumericAxis(vAxisLength); // treat as points
       else if (vAxisLength == static_cast<size_t>(nSpec + 1))
diff --git a/Framework/Algorithms/src/DetectorDiagnostic.cpp b/Framework/Algorithms/src/DetectorDiagnostic.cpp
index 35dafe442d1123b564500d52c744a7b9fa1489de..ae0337802fad921b9bce430e2db4ffeb5a7d5751 100644
--- a/Framework/Algorithms/src/DetectorDiagnostic.cpp
+++ b/Framework/Algorithms/src/DetectorDiagnostic.cpp
@@ -629,9 +629,9 @@ DetectorDiagnostic::calculateMedian(const API::MatrixWorkspace_sptr input,
 
     bool checkForMask = false;
     Geometry::Instrument_const_sptr instrument = input->getInstrument();
-    if (instrument != NULL) {
-      checkForMask = ((instrument->getSource() != NULL) &&
-                      (instrument->getSample() != NULL));
+    if (instrument != nullptr) {
+      checkForMask = ((instrument->getSource() != nullptr) &&
+                      (instrument->getSample() != nullptr));
     }
 
     PARALLEL_FOR1(input)
diff --git a/Framework/Algorithms/src/DetectorEfficiencyCor.cpp b/Framework/Algorithms/src/DetectorEfficiencyCor.cpp
index 2cd1a198b892ca8c854f48593226f17e9d0d9f7a..2c4ac81cce9ccb43de74747c0057d1bf9dbedad6 100644
--- a/Framework/Algorithms/src/DetectorEfficiencyCor.cpp
+++ b/Framework/Algorithms/src/DetectorEfficiencyCor.cpp
@@ -65,7 +65,7 @@ const std::string THICKNESS_PARAM = "TubeThickness";
 // this default constructor calls default constructors and sets other member
 // data to impossible (flag) values
 DetectorEfficiencyCor::DetectorEfficiencyCor()
-    : Algorithm(), m_inputWS(), m_outputWS(), m_paraMap(NULL), m_Ei(-1.0),
+    : Algorithm(), m_inputWS(), m_outputWS(), m_paraMap(nullptr), m_Ei(-1.0),
       m_ki(-1.0), m_shapeCache(), m_samplePos(), m_spectraSkipped() {
   m_shapeCache.clear();
 }
diff --git a/Framework/Algorithms/src/DetectorEfficiencyVariation.cpp b/Framework/Algorithms/src/DetectorEfficiencyVariation.cpp
index 011b562de726798e6589ff05826220931998a34b..ce73a8be47c45eef32935a3c30b11aae7afee80c 100644
--- a/Framework/Algorithms/src/DetectorEfficiencyVariation.cpp
+++ b/Framework/Algorithms/src/DetectorEfficiencyVariation.cpp
@@ -211,9 +211,9 @@ int DetectorEfficiencyVariation::doDetectorTests(
 
   bool checkForMask = false;
   Geometry::Instrument_const_sptr instrument = counts1->getInstrument();
-  if (instrument != NULL) {
-    checkForMask = ((instrument->getSource() != NULL) &&
-                    (instrument->getSample() != NULL));
+  if (instrument != nullptr) {
+    checkForMask = ((instrument->getSource() != nullptr) &&
+                    (instrument->getSample() != nullptr));
   }
 
   const double deadValue(1.0);
diff --git a/Framework/Algorithms/src/DiffractionEventCalibrateDetectors.cpp b/Framework/Algorithms/src/DiffractionEventCalibrateDetectors.cpp
index aff7bb225ddae47148d3157aee67e5500f4e778a..82d2eb2dcb16dd3d4ff838efcb7c1ca988b7748a 100644
--- a/Framework/Algorithms/src/DiffractionEventCalibrateDetectors.cpp
+++ b/Framework/Algorithms/src/DiffractionEventCalibrateDetectors.cpp
@@ -418,7 +418,7 @@ void DiffractionEventCalibrateDetectors::exec() {
     std::cout << tim << " to CreateGroupingWorkspace" << std::endl;
 
     const gsl_multimin_fminimizer_type *T = gsl_multimin_fminimizer_nmsimplex;
-    gsl_multimin_fminimizer *s = NULL;
+    gsl_multimin_fminimizer *s = nullptr;
     gsl_vector *ss, *x;
     gsl_multimin_function minex_func;
 
diff --git a/Framework/Algorithms/src/DiffractionFocussing2.cpp b/Framework/Algorithms/src/DiffractionFocussing2.cpp
index 8ba970a8d09eaa3ebffccf424080182a2f72f1b9..29c14ecf1ef8d370a86856bade24627b4021ecba 100644
--- a/Framework/Algorithms/src/DiffractionFocussing2.cpp
+++ b/Framework/Algorithms/src/DiffractionFocussing2.cpp
@@ -145,7 +145,7 @@ void DiffractionFocussing2::exec() {
   double eventXMax = 0.;
 
   m_eventW = boost::dynamic_pointer_cast<const EventWorkspace>(m_matrixInputW);
-  if (m_eventW != NULL) {
+  if (m_eventW != nullptr) {
     if (getProperty("PreserveEvents")) {
       // Input workspace is an event workspace. Use the other exec method
       this->execEvent();
@@ -153,7 +153,7 @@ void DiffractionFocussing2::exec() {
       return;
     } else {
       // get the full d-spacing range
-      m_eventW->sortAll(DataObjects::TOF_SORT, NULL);
+      m_eventW->sortAll(DataObjects::TOF_SORT, nullptr);
       m_matrixInputW->getXMinMax(eventXMin, eventXMax);
     }
   }
@@ -575,9 +575,9 @@ void DiffractionFocussing2::determineRebinParameters() {
   // whether or not to bother checking for a mask
   bool checkForMask = false;
   Geometry::Instrument_const_sptr instrument = m_matrixInputW->getInstrument();
-  if (instrument != NULL) {
-    checkForMask = ((instrument->getSource() != NULL) &&
-                    (instrument->getSample() != NULL));
+  if (instrument != nullptr) {
+    checkForMask = ((instrument->getSource() != nullptr) &&
+                    (instrument->getSample() != nullptr));
   }
 
   groupAtWorkspaceIndex.resize(nHist);
@@ -591,7 +591,7 @@ void DiffractionFocussing2::determineRebinParameters() {
 
     // the spectrum is the real thing we want to work with
     const ISpectrum *spec = m_matrixInputW->getSpectrum(wi);
-    if (spec == NULL) {
+    if (spec == nullptr) {
       groupAtWorkspaceIndex[wi] = -1;
       continue;
     }
diff --git a/Framework/Algorithms/src/ExportTimeSeriesLog.cpp b/Framework/Algorithms/src/ExportTimeSeriesLog.cpp
index 17f737ce668252062ba88f526192ba4707b6bf3f..67ef7365381b858d32d4aad9ae16c56db84f014d 100644
--- a/Framework/Algorithms/src/ExportTimeSeriesLog.cpp
+++ b/Framework/Algorithms/src/ExportTimeSeriesLog.cpp
@@ -335,7 +335,7 @@ void ExportTimeSeriesLog::setupEventWorkspace(
                                               values[i + start_index]));
   }
   // Ensure thread-safety
-  outEventWS->sortAll(TOF_SORT, NULL);
+  outEventWS->sortAll(TOF_SORT, nullptr);
 
   // Now, create a default X-vector for histogramming, with just 2 bins.
   Kernel::cow_ptr<MantidVec> axis;
diff --git a/Framework/Algorithms/src/ExtractSpectra.cpp b/Framework/Algorithms/src/ExtractSpectra.cpp
index b3530855cb3effad9bb21c1d1760dd0c4eefbbc5..78be3cf092fa0e0bed1991c41cee3452f8e825c7 100644
--- a/Framework/Algorithms/src/ExtractSpectra.cpp
+++ b/Framework/Algorithms/src/ExtractSpectra.cpp
@@ -109,7 +109,7 @@ void ExtractSpectra::exec() {
   m_inputWorkspace = getProperty("InputWorkspace");
 
   eventW = boost::dynamic_pointer_cast<EventWorkspace>(m_inputWorkspace);
-  if (eventW != NULL) {
+  if (eventW != nullptr) {
     // Input workspace is an event workspace. Use the other exec method
     this->execEvent();
   } else {
@@ -134,9 +134,9 @@ void ExtractSpectra::execHistogram() {
 
   // If this is a Workspace2D, get the spectra axes for copying in the spectraNo
   // later
-  Axis *inAxis1(NULL);
-  TextAxis *outTxtAxis(NULL);
-  NumericAxis *outNumAxis(NULL);
+  Axis *inAxis1(nullptr);
+  TextAxis *outTxtAxis(nullptr);
+  NumericAxis *outNumAxis(nullptr);
   if (m_inputWorkspace->axes() > 1) {
     inAxis1 = m_inputWorkspace->getAxis(1);
     auto outAxis1 = outputWorkspace->getAxis(1);
@@ -289,8 +289,8 @@ void ExtractSpectra::execEvent() {
           API::WorkspaceFactory::Instance().create(
               "EventWorkspace", m_workspaceIndexList.size(), ntcnew,
               ntcnew - m_histogram));
-  eventW->sortAll(TOF_SORT, NULL);
-  outputWorkspace->sortAll(TOF_SORT, NULL);
+  eventW->sortAll(TOF_SORT, nullptr);
+  outputWorkspace->sortAll(TOF_SORT, nullptr);
   // Copy required stuff from it
   API::WorkspaceFactory::Instance().initializeFromParent(m_inputWorkspace,
                                                          outputWorkspace, true);
@@ -402,7 +402,7 @@ void ExtractSpectra::checkProperties() {
       g_log.error("XMin must be less than XMax");
       throw std::out_of_range("XMin must be less than XMax");
     }
-    if (m_minX == m_maxX && m_commonBoundaries && eventW == NULL) {
+    if (m_minX == m_maxX && m_commonBoundaries && eventW == nullptr) {
       g_log.error("The X range given lies entirely within a single bin");
       throw std::out_of_range(
           "The X range given lies entirely within a single bin");
diff --git a/Framework/Algorithms/src/FilterByLogValue.cpp b/Framework/Algorithms/src/FilterByLogValue.cpp
index 8d9c7f05d4515646b7fc58728832f6cdef707d1a..a679717da4d2b77be4f7df66d3e15f8588867504 100644
--- a/Framework/Algorithms/src/FilterByLogValue.cpp
+++ b/Framework/Algorithms/src/FilterByLogValue.cpp
@@ -93,7 +93,7 @@ std::map<std::string, std::string> FilterByLogValue::validateInputs() {
   try {
     ITimeSeriesProperty *log =
         dynamic_cast<ITimeSeriesProperty *>(inputWS->run().getLogData(logname));
-    if (log == NULL) {
+    if (log == nullptr) {
       errors["LogName"] = "'" + logname + "' is not a time-series log.";
       return errors;
     }
diff --git a/Framework/Algorithms/src/FindDetectorsOutsideLimits.cpp b/Framework/Algorithms/src/FindDetectorsOutsideLimits.cpp
index b0be58473489b36de8785c277dc3e7620f53e89e..1d263b90ced238f0bc5902aec7f95f5498bd9a3f 100644
--- a/Framework/Algorithms/src/FindDetectorsOutsideLimits.cpp
+++ b/Framework/Algorithms/src/FindDetectorsOutsideLimits.cpp
@@ -117,9 +117,9 @@ void FindDetectorsOutsideLimits::exec() {
 
   bool checkForMask = false;
   Geometry::Instrument_const_sptr instrument = inputWS->getInstrument();
-  if (instrument != NULL) {
-    checkForMask = ((instrument->getSource() != NULL) &&
-                    (instrument->getSample() != NULL));
+  if (instrument != nullptr) {
+    checkForMask = ((instrument->getSource() != nullptr) &&
+                    (instrument->getSample() != nullptr));
   }
 
   int numFailed(0);
diff --git a/Framework/Algorithms/src/FindPeaks.cpp b/Framework/Algorithms/src/FindPeaks.cpp
index bd0b90c1e3e05b6be022ceaed975ce34df5c2e35..02698ab59088dc4b5a774b6712b22afd27248ade 100644
--- a/Framework/Algorithms/src/FindPeaks.cpp
+++ b/Framework/Algorithms/src/FindPeaks.cpp
@@ -38,7 +38,7 @@ DECLARE_ALGORITHM(FindPeaks)
   */
 FindPeaks::FindPeaks()
     : API::Algorithm(), m_peakParameterNames(), m_bkgdParameterNames(),
-      m_bkgdOrder(0), m_outPeakTableWS(), m_progress(NULL), m_dataWS(),
+      m_bkgdOrder(0), m_outPeakTableWS(), m_progress(nullptr), m_dataWS(),
       m_inputPeakFWHM(0), m_wsIndex(0), singleSpectrum(false),
       m_highBackground(false), m_rawPeaksTable(false), m_numTableParams(0),
       m_centreIndex(1) /* for Gaussian */, m_peakFuncType(""),
diff --git a/Framework/Algorithms/src/GenerateEventsFilter.cpp b/Framework/Algorithms/src/GenerateEventsFilter.cpp
index 5c1d9a29caf6fba72a10f95a6d9be3a4e315d44d..b4de3be72d48d41d2965eebad651ae701315d800 100644
--- a/Framework/Algorithms/src/GenerateEventsFilter.cpp
+++ b/Framework/Algorithms/src/GenerateEventsFilter.cpp
@@ -28,7 +28,7 @@ DECLARE_ALGORITHM(GenerateEventsFilter)
 GenerateEventsFilter::GenerateEventsFilter()
     : API::Algorithm(), m_dataWS(), m_splitWS(), m_filterWS(), m_filterInfoWS(),
       m_startTime(), m_stopTime(), m_runEndTime(),
-      m_timeUnitConvertFactorToNS(0.), m_dblLog(NULL), m_intLog(NULL),
+      m_timeUnitConvertFactorToNS(0.), m_dblLog(nullptr), m_intLog(nullptr),
       m_logAtCentre(false), m_logTimeTolerance(0.), m_forFastLog(false),
       m_splitters(), m_vecSplitterTime(), m_vecSplitterGroup(),
       m_useParallel(false), m_vecSplitterTimeSet(), m_vecGroupIndexSet() {}
diff --git a/Framework/Algorithms/src/GetAllEi.cpp b/Framework/Algorithms/src/GetAllEi.cpp
index 5e6974ff5ecdd736a82faa427115fbeef6ab6008..f86e1cb68d2571960eac006b9ae561c849f5b7a3 100644
--- a/Framework/Algorithms/src/GetAllEi.cpp
+++ b/Framework/Algorithms/src/GetAllEi.cpp
@@ -26,7 +26,7 @@ GetAllEi::GetAllEi()
       m_min_Eresolution(0.08),
       // half maximal resolution for LET
       m_max_Eresolution(0.5e-3), m_peakEnergyRatio2reject(0.1), m_phase(0),
-      m_chopper(), m_pFilterLog(NULL) {}
+      m_chopper(), m_pFilterLog(nullptr) {}
 
 /// Initialization method.
 void GetAllEi::init() {
@@ -982,7 +982,7 @@ GetAllEi::getPLogForProperty(const API::MatrixWorkspace_sptr &inputWS,
   if (boost::iequals(LogName, "Defined in IDF")) {
     auto AllNames = m_chopper->getStringParameter(propertyName);
     if (AllNames.size() != 1)
-      return NULL;
+      return nullptr;
     LogName = AllNames[0];
   }
   auto pIProperty = (inputWS->run().getProperty(LogName));
diff --git a/Framework/Algorithms/src/GetDetOffsetsMultiPeaks.cpp b/Framework/Algorithms/src/GetDetOffsetsMultiPeaks.cpp
index ed6fedd46ee75042c300526e89d281f43395ebad..34fb21dbde5ff1b96b9597474ece960d794e2f24 100644
--- a/Framework/Algorithms/src/GetDetOffsetsMultiPeaks.cpp
+++ b/Framework/Algorithms/src/GetDetOffsetsMultiPeaks.cpp
@@ -714,7 +714,7 @@ void GetDetOffsetsMultiPeaks::fitPeaksOffset(
 
   // Set up GSL minimzer
   const gsl_multimin_fminimizer_type *T = gsl_multimin_fminimizer_nmsimplex;
-  gsl_multimin_fminimizer *s = NULL;
+  gsl_multimin_fminimizer *s = nullptr;
   gsl_vector *ss, *x;
   gsl_multimin_function minex_func;
 
diff --git a/Framework/Algorithms/src/GetTimeSeriesLogInformation.cpp b/Framework/Algorithms/src/GetTimeSeriesLogInformation.cpp
index 8c078c51d93efaac0403abce51dd68ddfe6c1fac..4707d5595836893768adf5d924a27be3564c90cb 100644
--- a/Framework/Algorithms/src/GetTimeSeriesLogInformation.cpp
+++ b/Framework/Algorithms/src/GetTimeSeriesLogInformation.cpp
@@ -30,7 +30,7 @@ DECLARE_ALGORITHM(GetTimeSeriesLogInformation)
  */
 GetTimeSeriesLogInformation::GetTimeSeriesLogInformation()
     : API::Algorithm(), m_dataWS(), mRunStartTime(), mFilterT0(), mFilterTf(),
-      m_intInfoMap(), m_dblInfoMap(), m_log(NULL), m_timeVec(), m_valueVec(),
+      m_intInfoMap(), m_dblInfoMap(), m_log(nullptr), m_timeVec(), m_valueVec(),
       m_starttime(), m_endtime(), m_ignoreNegativeTime(false) {}
 
 //----------------------------------------------------------------------------------------------
diff --git a/Framework/Algorithms/src/He3TubeEfficiency.cpp b/Framework/Algorithms/src/He3TubeEfficiency.cpp
index f1a19dc5a7dd8ed95d9e45e516f0eb7f8991220a..077a4e670d3093afdfb5e6bd942473cf8c294d6f 100644
--- a/Framework/Algorithms/src/He3TubeEfficiency.cpp
+++ b/Framework/Algorithms/src/He3TubeEfficiency.cpp
@@ -28,8 +28,8 @@ DECLARE_ALGORITHM(He3TubeEfficiency)
 
 /// Default constructor
 He3TubeEfficiency::He3TubeEfficiency()
-    : Algorithm(), inputWS(), outputWS(), paraMap(NULL), shapeCache(),
-      samplePos(), spectraSkipped(), progress(NULL) {
+    : Algorithm(), inputWS(), outputWS(), paraMap(nullptr), shapeCache(),
+      samplePos(), spectraSkipped(), progress(nullptr) {
   this->shapeCache.clear();
 }
 
@@ -103,7 +103,7 @@ void He3TubeEfficiency::exec() {
   // Check if it is an event workspace
   DataObjects::EventWorkspace_const_sptr eventW =
       boost::dynamic_pointer_cast<const DataObjects::EventWorkspace>(inputWS);
-  if (eventW != NULL) {
+  if (eventW != nullptr) {
     this->execEvent();
     return;
   }
diff --git a/Framework/Algorithms/src/InterpolatingRebin.cpp b/Framework/Algorithms/src/InterpolatingRebin.cpp
index 76cbdf0b30f9829d81f7674ee9f7ca88b12f9c16..562bb465c7f7c7f6830e9d41eaac1cd06f63fdee 100644
--- a/Framework/Algorithms/src/InterpolatingRebin.cpp
+++ b/Framework/Algorithms/src/InterpolatingRebin.cpp
@@ -135,7 +135,7 @@ void InterpolatingRebin::outputYandEValues(
       << "Preparing to calculate y-values using splines and estimate errors\n";
 
   // prepare to use GSL functions but don't let them terminate Mantid
-  gsl_error_handler_t *old_handler = gsl_set_error_handler(NULL);
+  gsl_error_handler_t *old_handler = gsl_set_error_handler(nullptr);
 
   const int histnumber = static_cast<int>(inputW->getNumberHistograms());
   Progress prog(this, 0.0, 1.0, histnumber);
@@ -298,8 +298,8 @@ void InterpolatingRebin::cubicInterpolation(
   }
 
   // get the GSL to allocate the memory
-  gsl_interp_accel *acc = NULL;
-  gsl_spline *spline = NULL;
+  gsl_interp_accel *acc = nullptr;
+  gsl_spline *spline = nullptr;
   try {
     acc = gsl_interp_accel_alloc();
     const size_t nPoints = oldIn2 - oldIn1 + 1;
diff --git a/Framework/Algorithms/src/MaskBins.cpp b/Framework/Algorithms/src/MaskBins.cpp
index 4596c5ef4551a2643008c17053d70090347f390a..d0a76b0032932dd153354a257a165db81eb984f2 100644
--- a/Framework/Algorithms/src/MaskBins.cpp
+++ b/Framework/Algorithms/src/MaskBins.cpp
@@ -95,7 +95,7 @@ void MaskBins::exec() {
   EventWorkspace_const_sptr eventW =
       boost::dynamic_pointer_cast<const EventWorkspace>(inputWS);
 
-  if (eventW != NULL) {
+  if (eventW != nullptr) {
     //------- EventWorkspace ---------------------------
     this->execEvent();
   } else {
diff --git a/Framework/Algorithms/src/MedianDetectorTest.cpp b/Framework/Algorithms/src/MedianDetectorTest.cpp
index c79c0eb1e07eb0923179fc162f93dc320b7223e2..382d4ec132c6e33f6ab48e6c8eb86602545b5fa2 100644
--- a/Framework/Algorithms/src/MedianDetectorTest.cpp
+++ b/Framework/Algorithms/src/MedianDetectorTest.cpp
@@ -101,7 +101,7 @@ void MedianDetectorTest::exec() {
   // 0. Correct for solid angle, if desired
   if (m_solidAngle) {
     MatrixWorkspace_sptr solidAngle = getSolidAngles(m_minSpec, m_maxSpec);
-    if (solidAngle != NULL) {
+    if (solidAngle != nullptr) {
       countsWS = countsWS / solidAngle;
     }
   }
@@ -240,9 +240,9 @@ int MedianDetectorTest::maskOutliers(
 
   bool checkForMask = false;
   Geometry::Instrument_const_sptr instrument = countsWS->getInstrument();
-  if (instrument != NULL) {
-    checkForMask = ((instrument->getSource() != NULL) &&
-                    (instrument->getSample() != NULL));
+  if (instrument != nullptr) {
+    checkForMask = ((instrument->getSource() != nullptr) &&
+                    (instrument->getSample() != nullptr));
   }
 
   for (size_t i = 0; i < indexmap.size(); ++i) {
@@ -308,9 +308,9 @@ int MedianDetectorTest::doDetectorTests(
 
   bool checkForMask = false;
   Geometry::Instrument_const_sptr instrument = countsWS->getInstrument();
-  if (instrument != NULL) {
-    checkForMask = ((instrument->getSource() != NULL) &&
-                    (instrument->getSample() != NULL));
+  if (instrument != nullptr) {
+    checkForMask = ((instrument->getSource() != nullptr) &&
+                    (instrument->getSample() != nullptr));
   }
 
   PARALLEL_FOR2(countsWS, maskWS)
diff --git a/Framework/Algorithms/src/MergeRuns.cpp b/Framework/Algorithms/src/MergeRuns.cpp
index 7c60a8f00e8b85e5b149d6e0fe378109a18417b7..4ab97b7d5ea82312fa454040de30f3fe0f41a5af 100644
--- a/Framework/Algorithms/src/MergeRuns.cpp
+++ b/Framework/Algorithms/src/MergeRuns.cpp
@@ -19,7 +19,7 @@ using namespace DataObjects;
 
 /// Default constructor
 MergeRuns::MergeRuns()
-    : MultiPeriodGroupAlgorithm(), m_progress(NULL), m_inEventWS(),
+    : MultiPeriodGroupAlgorithm(), m_progress(nullptr), m_inEventWS(),
       m_inMatrixWS(), m_tables() {}
 
 /// Destructor
diff --git a/Framework/Algorithms/src/ModeratorTzero.cpp b/Framework/Algorithms/src/ModeratorTzero.cpp
index 9e8fcbf851fb045ea38af322fa2822abed7bad7b..69d2bc0af78249f9002827c7e0c52f5dafd85a87 100644
--- a/Framework/Algorithms/src/ModeratorTzero.cpp
+++ b/Framework/Algorithms/src/ModeratorTzero.cpp
@@ -104,7 +104,7 @@ void ModeratorTzero::exec() {
   // Run execEvent if eventWorkSpace
   EventWorkspace_const_sptr eventWS =
       boost::dynamic_pointer_cast<const EventWorkspace>(inputWS);
-  if (eventWS != NULL) {
+  if (eventWS != nullptr) {
     execEvent(emode);
     return;
   }
diff --git a/Framework/Algorithms/src/ModeratorTzeroLinear.cpp b/Framework/Algorithms/src/ModeratorTzeroLinear.cpp
index 8e2820e42e81c4f6804659a9d5caf3b79d196830..64a33b43fe810b801d0dfaca8c7d56dc740e7be8 100644
--- a/Framework/Algorithms/src/ModeratorTzeroLinear.cpp
+++ b/Framework/Algorithms/src/ModeratorTzeroLinear.cpp
@@ -116,7 +116,7 @@ void ModeratorTzeroLinear::exec() {
   // Run execEvent if eventWorkSpace
   EventWorkspace_const_sptr eventWS =
       boost::dynamic_pointer_cast<const EventWorkspace>(inputWS);
-  if (eventWS != NULL) {
+  if (eventWS != nullptr) {
     execEvent();
     return;
   }
diff --git a/Framework/Algorithms/src/MonteCarloAbsorption.cpp b/Framework/Algorithms/src/MonteCarloAbsorption.cpp
index e482d090fbead93c0eac292af46ed07a15e7219e..9cfc8a3c2b4c5180907780d64d42cff5c4ab7513 100644
--- a/Framework/Algorithms/src/MonteCarloAbsorption.cpp
+++ b/Framework/Algorithms/src/MonteCarloAbsorption.cpp
@@ -46,7 +46,7 @@ using namespace Kernel;
 MonteCarloAbsorption::MonteCarloAbsorption()
     : m_samplePos(), m_sourcePos(), m_numVolumeElements(0), m_blocks(),
       m_blkHalfX(0.0), m_blkHalfY(0.0), m_blkHalfZ(0.0), m_rngs(0), m_inputWS(),
-      m_sampleShape(NULL), m_sampleMaterial(NULL), m_container(NULL),
+      m_sampleShape(nullptr), m_sampleMaterial(nullptr), m_container(nullptr),
       m_numberOfPoints(0), m_xStepSize(0), m_numberOfEvents(300) {}
 
 /**
@@ -360,7 +360,7 @@ void MonteCarloAbsorption::retrieveInput() {
   try {
     m_container = &(m_inputWS->sample().getEnvironment());
   } catch (std::runtime_error &) {
-    m_container = NULL;
+    m_container = nullptr;
     g_log.information()
         << "No environment has been defined, continuing with only sample.\n";
   }
diff --git a/Framework/Algorithms/src/MultipleScatteringCylinderAbsorption.cpp b/Framework/Algorithms/src/MultipleScatteringCylinderAbsorption.cpp
index dda243face367a77add468103141a4b856ab3626..1ce5d84cb6edbecbc4be0744d559429426f3fdd0 100644
--- a/Framework/Algorithms/src/MultipleScatteringCylinderAbsorption.cpp
+++ b/Framework/Algorithms/src/MultipleScatteringCylinderAbsorption.cpp
@@ -139,15 +139,15 @@ void MultipleScatteringCylinderAbsorption::exec() {
   // geometry stuff
   const int64_t NUM_HIST = static_cast<int64_t>(in_WS->getNumberHistograms());
   Instrument_const_sptr instrument = in_WS->getInstrument();
-  if (instrument == NULL)
+  if (instrument == nullptr)
     throw std::runtime_error(
         "Failed to find instrument attached to InputWorkspace");
   IComponent_const_sptr source = instrument->getSource();
   IComponent_const_sptr sample = instrument->getSample();
-  if (source == NULL)
+  if (source == nullptr)
     throw std::runtime_error(
         "Failed to find source in the instrument for InputWorkspace");
-  if (sample == NULL)
+  if (sample == nullptr)
     throw std::runtime_error(
         "Failed to find sample in the instrument for InputWorkspace");
 
@@ -181,7 +181,7 @@ void MultipleScatteringCylinderAbsorption::exec() {
     for (int64_t index = 0; index < NUM_HIST; ++index) {
       PARALLEL_START_INTERUPT_REGION
       IDetector_const_sptr det = out_WSevent->getDetector(index);
-      if (det == NULL)
+      if (det == nullptr)
         throw std::runtime_error("Failed to find detector");
       if (det->isMasked())
         continue;
@@ -218,7 +218,7 @@ void MultipleScatteringCylinderAbsorption::exec() {
 
     for (int64_t index = 0; index < NUM_HIST; ++index) {
       IDetector_const_sptr det = in_WS->getDetector(index);
-      if (det == NULL)
+      if (det == nullptr)
         throw std::runtime_error("Failed to find detector");
       if (det->isMasked())
         continue;
diff --git a/Framework/Algorithms/src/NormaliseByDetector.cpp b/Framework/Algorithms/src/NormaliseByDetector.cpp
index 888e50ba6c0880be2af7ab9f886780ac70ee1964..4d531c5bc7d1cfc603ae11f235a354c8959f0146 100644
--- a/Framework/Algorithms/src/NormaliseByDetector.cpp
+++ b/Framework/Algorithms/src/NormaliseByDetector.cpp
@@ -72,7 +72,7 @@ void NormaliseByDetector::init() {
 
 const Geometry::FitParameter NormaliseByDetector::tryParseFunctionParameter(
     Geometry::Parameter_sptr parameter, Geometry::IDetector_const_sptr det) {
-  if (parameter == NULL) {
+  if (parameter == nullptr) {
     std::stringstream stream;
     stream << det->getName() << " and all of it's parent components, have no "
                                 "fitting type parameters. This algorithm "
diff --git a/Framework/Algorithms/src/PerformIndexOperations.cpp b/Framework/Algorithms/src/PerformIndexOperations.cpp
index b8bdb32c058e7709df5063d8a430d1bbd428ed6c..a6aca08fa879d200f045284e5f9a06dbbcf3e64b 100644
--- a/Framework/Algorithms/src/PerformIndexOperations.cpp
+++ b/Framework/Algorithms/src/PerformIndexOperations.cpp
@@ -152,7 +152,7 @@ typedef std::vector<boost::shared_ptr<CommandParser>> VecCommandParsers;
 template <typename ProductType> class CommandParserBase : public CommandParser {
 public:
   virtual Command *interpret(const std::string &instruction) const {
-    Command *command = NULL;
+    Command *command = nullptr;
     boost::regex ex = getRegex();
     if (boost::regex_match(instruction, ex)) {
       auto indexes =
@@ -192,7 +192,7 @@ public:
   virtual ~AdditionParser() {}
 
   virtual Command *interpret(const std::string &instruction) const {
-    Command *command = NULL;
+    Command *command = nullptr;
     boost::regex ex("^\\s*[0-9]+\\s*\\+\\s*[0-9]+\\s*$");
     if (boost::regex_match(instruction, ex)) {
       std::vector<std::string> arguments;
@@ -234,7 +234,7 @@ public:
   virtual ~CropParserIndex() {}
 
   virtual Command *interpret(const std::string &instruction) const {
-    Command *command = NULL;
+    Command *command = nullptr;
     boost::regex ex("^\\s*[0-9]+\\s*$");
     if (boost::regex_match(instruction, ex)) {
       int index = -1;
diff --git a/Framework/Algorithms/src/Q1D2.cpp b/Framework/Algorithms/src/Q1D2.cpp
index a7906aeeb68477ddb8334a4fe7a64d9034ac1fb3..2bff5f108be1b7bf138b76b5aafe0260cada7a13 100644
--- a/Framework/Algorithms/src/Q1D2.cpp
+++ b/Framework/Algorithms/src/Q1D2.cpp
@@ -112,9 +112,9 @@ void Q1D2::exec() {
   // FIXME: how to examine the wavePixelAdj?
   g_log.debug() << "All input workspaces were found to be valid\n";
   // normalization as a function of wavelength (i.e. centers of x-value bins)
-  double const *const binNorms = waveAdj ? &(waveAdj->readY(0)[0]) : NULL;
+  double const *const binNorms = waveAdj ? &(waveAdj->readY(0)[0]) : nullptr;
   // error on the wavelength normalization
-  double const *const binNormEs = waveAdj ? &(waveAdj->readE(0)[0]) : NULL;
+  double const *const binNormEs = waveAdj ? &(waveAdj->readE(0)[0]) : nullptr;
 
   // define the (large number of) data objects that are going to be used in all
   // iterations of the loop below
diff --git a/Framework/Algorithms/src/Rebin.cpp b/Framework/Algorithms/src/Rebin.cpp
index 7edf8b2f2b12883055a32181ff60fc19c3446772..a94737ebf52f71f516357167734dff1548bd1452 100644
--- a/Framework/Algorithms/src/Rebin.cpp
+++ b/Framework/Algorithms/src/Rebin.cpp
@@ -140,7 +140,7 @@ void Rebin::exec() {
   EventWorkspace_const_sptr eventInputWS =
       boost::dynamic_pointer_cast<const EventWorkspace>(inputWS);
 
-  if (eventInputWS != NULL) {
+  if (eventInputWS != nullptr) {
     //------- EventWorkspace as input -------------------------------------
     EventWorkspace_sptr eventOutputWS =
         boost::dynamic_pointer_cast<EventWorkspace>(outputWS);
diff --git a/Framework/Algorithms/src/ReflectometryReductionOne.cpp b/Framework/Algorithms/src/ReflectometryReductionOne.cpp
index 9640658dc1d9c71f12e6e02c8c958cbb29d152c2..46d61f39c6c4a5884fd60ac1e9115d713fddee8b 100644
--- a/Framework/Algorithms/src/ReflectometryReductionOne.cpp
+++ b/Framework/Algorithms/src/ReflectometryReductionOne.cpp
@@ -408,7 +408,7 @@ ReflectometryReductionOne::getSurfaceSampleComponent(
     sampleComponent = this->getPropertyValue("SampleComponentName");
   }
   auto searchResult = inst->getComponentByName(sampleComponent);
-  if (searchResult == NULL) {
+  if (searchResult == nullptr) {
     throw std::invalid_argument(sampleComponent +
                                 " does not exist. Check input properties.");
   }
@@ -435,7 +435,7 @@ ReflectometryReductionOne::getDetectorComponent(
   }
   boost::shared_ptr<const IComponent> searchResult =
       inst->getComponentByName(componentToCorrect);
-  if (searchResult == NULL) {
+  if (searchResult == nullptr) {
     throw std::invalid_argument(componentToCorrect +
                                 " does not exist. Check input properties.");
   }
diff --git a/Framework/Algorithms/src/RemoveBackground.cpp b/Framework/Algorithms/src/RemoveBackground.cpp
index 54df033197e32675ce06e7a776c47965f56397dc..53f74caa5150d4f3db7374853f70b93277720544 100644
--- a/Framework/Algorithms/src/RemoveBackground.cpp
+++ b/Framework/Algorithms/src/RemoveBackground.cpp
@@ -159,7 +159,7 @@ void RemoveBackground::exec() {
 //-------------------------------------------------------------------------------------------------------------------------------
 /// Constructor
 BackgroundHelper::BackgroundHelper()
-    : m_WSUnit(), m_bgWs(), m_wkWS(), m_pgLog(NULL), m_inPlace(true),
+    : m_WSUnit(), m_bgWs(), m_wkWS(), m_pgLog(nullptr), m_inPlace(true),
       m_singleValueBackground(false), m_NBg(0), m_dtBg(1), m_ErrSq(0),
       m_Emode(0), m_L1(0), m_Efix(0), m_Sample(), m_nullifyNegative(false),
       m_previouslyRemovedBkgMode(false) {}
@@ -171,7 +171,7 @@ void BackgroundHelper::deleteUnitsConverters() {
   for (size_t i = 0; i < m_WSUnit.size(); i++) {
     if (m_WSUnit[i]) {
       delete m_WSUnit[i];
-      m_WSUnit[i] = NULL;
+      m_WSUnit[i] = nullptr;
     }
   }
 }
@@ -229,7 +229,7 @@ void BackgroundHelper::initialize(const API::MatrixWorkspace_const_sptr &bkgWS,
   this->deleteUnitsConverters();
   // allocate the array of units converters to avoid units reallocation within a
   // loop
-  m_WSUnit.assign(nThreads, NULL);
+  m_WSUnit.assign(nThreads, nullptr);
   for (int i = 0; i < nThreads; i++) {
     m_WSUnit[i] = WSUnit->clone();
   }
diff --git a/Framework/Algorithms/src/RemoveBins.cpp b/Framework/Algorithms/src/RemoveBins.cpp
index f759b496a01ec4fee1f6586003adeb56797caa24..f658485481643ae61ede238e1969d435ff6cadf0 100644
--- a/Framework/Algorithms/src/RemoveBins.cpp
+++ b/Framework/Algorithms/src/RemoveBins.cpp
@@ -273,7 +273,7 @@ void RemoveBins::calculateDetectorPosition(const int &index, double &l1,
   // Get the distance between the source and the sample (assume in metres)
   Geometry::IComponent_const_sptr sample = instrument->getSample();
   // Check for valid instrument
-  if (sample == NULL) {
+  if (sample == nullptr) {
     throw Exception::InstrumentDefinitionError(
         "Instrument not sufficiently defined: failed to get sample");
   }
diff --git a/Framework/Algorithms/src/RemoveLowResTOF.cpp b/Framework/Algorithms/src/RemoveLowResTOF.cpp
index c56d99b7c4f7d61fe9802f7d8da6a0c5e0c6375f..5db25548e07d375ff415419fd6ea95a9f03621fe 100644
--- a/Framework/Algorithms/src/RemoveLowResTOF.cpp
+++ b/Framework/Algorithms/src/RemoveLowResTOF.cpp
@@ -30,7 +30,7 @@ DECLARE_ALGORITHM(RemoveLowResTOF)
 RemoveLowResTOF::RemoveLowResTOF()
     : m_inputWS(), m_inputEvWS(), m_DIFCref(0.), m_K(0.), m_instrument(),
       m_sample(), m_L1(0.), m_Tmin(0.), m_wavelengthMin(0.),
-      m_numberOfSpectra(0), m_progress(NULL), m_outputLowResTOF(false) {}
+      m_numberOfSpectra(0), m_progress(nullptr), m_outputLowResTOF(false) {}
 
 /// Destructor
 RemoveLowResTOF::~RemoveLowResTOF() { delete m_progress; }
@@ -120,7 +120,7 @@ void RemoveLowResTOF::exec() {
 
   // go off and do the event version if appropriate
   m_inputEvWS = boost::dynamic_pointer_cast<const EventWorkspace>(m_inputWS);
-  if (m_inputEvWS != NULL) {
+  if (m_inputEvWS != nullptr) {
     this->execEvent();
     return;
   }
diff --git a/Framework/Algorithms/src/ResampleX.cpp b/Framework/Algorithms/src/ResampleX.cpp
index 1b0aff6ccb6186918c560b27d89fd6d406547ce6..c95156048611e0e62ea8bd47c5cb9fdfce1dd5fb 100644
--- a/Framework/Algorithms/src/ResampleX.cpp
+++ b/Framework/Algorithms/src/ResampleX.cpp
@@ -130,7 +130,7 @@ string determineXMinMax(MatrixWorkspace_sptr inputWS, vector<double> &xmins,
   double xmax_wksp = inputWS->getXMax();
   EventWorkspace_const_sptr inputEventWS =
       boost::dynamic_pointer_cast<const EventWorkspace>(inputWS);
-  if (inputEventWS != NULL) {
+  if (inputEventWS != nullptr) {
     xmin_wksp = inputEventWS->getTofMin();
     xmax_wksp = inputEventWS->getTofMax();
   }
@@ -318,7 +318,7 @@ void ResampleX::exec() {
   // start doing actual work
   EventWorkspace_const_sptr inputEventWS =
       boost::dynamic_pointer_cast<const EventWorkspace>(inputWS);
-  if (inputEventWS != NULL) {
+  if (inputEventWS != nullptr) {
     if (m_preserveEvents) {
       EventWorkspace_sptr outputEventWS =
           boost::dynamic_pointer_cast<EventWorkspace>(outputWS);
diff --git a/Framework/Algorithms/src/ResetNegatives.cpp b/Framework/Algorithms/src/ResetNegatives.cpp
index 8e3d93ed905652e84c0cc7adcbdf04737f67516e..6768b5499cffe0822e6c12115648140955f36f34 100644
--- a/Framework/Algorithms/src/ResetNegatives.cpp
+++ b/Framework/Algorithms/src/ResetNegatives.cpp
@@ -94,7 +94,7 @@ void ResetNegatives::exec() {
   DataObjects::EventWorkspace_const_sptr eventWS =
       boost::dynamic_pointer_cast<const DataObjects::EventWorkspace>(inputWS);
   if (eventWS)
-    eventWS->sortAll(DataObjects::TOF_SORT, NULL);
+    eventWS->sortAll(DataObjects::TOF_SORT, nullptr);
 
   Progress prog(this, .1, 1., 2 * nHist);
 
diff --git a/Framework/Algorithms/src/ScaleX.cpp b/Framework/Algorithms/src/ScaleX.cpp
index d0ea8c9c6f4d1c08c408a653a0f57e8f98576ce7..43493c31972ec670ae78565549b26b0f399034a3 100644
--- a/Framework/Algorithms/src/ScaleX.cpp
+++ b/Framework/Algorithms/src/ScaleX.cpp
@@ -20,7 +20,7 @@ DECLARE_ALGORITHM(ScaleX)
  * Default constructor
  */
 ScaleX::ScaleX()
-    : API::Algorithm(), m_progress(NULL), m_algFactor(1.0), m_parname(),
+    : API::Algorithm(), m_progress(nullptr), m_algFactor(1.0), m_parname(),
       m_combine(false), m_binOp(), m_wi_min(-1), m_wi_max(-1) {}
 
 /**
@@ -114,7 +114,7 @@ void ScaleX::exec() {
   // Check if its an event workspace
   EventWorkspace_const_sptr eventWS =
       boost::dynamic_pointer_cast<const EventWorkspace>(inputW);
-  if (eventWS != NULL) {
+  if (eventWS != nullptr) {
     this->execEvent();
     return;
   }
diff --git a/Framework/Algorithms/src/Segfault.cpp b/Framework/Algorithms/src/Segfault.cpp
index 2479120f24db684ac24137cf0375614c41a24746..a77f085911b7b5a123a003a709f4094a3ff65929 100644
--- a/Framework/Algorithms/src/Segfault.cpp
+++ b/Framework/Algorithms/src/Segfault.cpp
@@ -49,7 +49,7 @@ void Segfault::exec() {
 
   if (!dryrun) {
     // NULL pointer dereference
-    int *ptr = NULL;
+    int *ptr = nullptr;
     *ptr = 1;
   }
 }
diff --git a/Framework/Algorithms/src/SmoothNeighbours.cpp b/Framework/Algorithms/src/SmoothNeighbours.cpp
index 63d82f54b68ef8d78c0a4e45065d260216e9773d..f3131eaf879805e149ea6672a9f059d5bd3e32c0 100644
--- a/Framework/Algorithms/src/SmoothNeighbours.cpp
+++ b/Framework/Algorithms/src/SmoothNeighbours.cpp
@@ -40,7 +40,7 @@ SmoothNeighbours::SmoothNeighbours()
     : API::Algorithm(), AdjX(0), AdjY(0), Edge(0), Radius(0.), nNeighbours(0),
       WeightedSum(new NullWeighting), PreserveEvents(false),
       expandSumAllPixels(false), outWI(0), inWS(), m_neighbours(),
-      m_prog(NULL) {}
+      m_prog(nullptr) {}
 
 /** Initialisation method.
  *
@@ -810,7 +810,7 @@ void SmoothNeighbours::execEvent(Mantid::DataObjects::EventWorkspace_sptr ws) {
   // Copy geometry over.
   API::WorkspaceFactory::Instance().initializeFromParent(ws, outWS, false);
   // Ensure thread-safety
-  outWS->sortAll(TOF_SORT, NULL);
+  outWS->sortAll(TOF_SORT, nullptr);
 
   this->setProperty("OutputWorkspace",
                     boost::dynamic_pointer_cast<MatrixWorkspace>(outWS));
diff --git a/Framework/Algorithms/src/SpecularReflectionAlgorithm.cpp b/Framework/Algorithms/src/SpecularReflectionAlgorithm.cpp
index dde76efc181c3f8372f869f06369e8c4971eb753..75d17fc0eb49c4fff5f7da657629fd8c0fcf39ef 100644
--- a/Framework/Algorithms/src/SpecularReflectionAlgorithm.cpp
+++ b/Framework/Algorithms/src/SpecularReflectionAlgorithm.cpp
@@ -135,7 +135,7 @@ SpecularReflectionAlgorithm::getSurfaceSampleComponent(
     sampleComponent = this->getPropertyValue("SampleComponentName");
   }
   auto searchResult = inst->getComponentByName(sampleComponent);
-  if (searchResult == NULL) {
+  if (searchResult == nullptr) {
     throw std::invalid_argument(sampleComponent +
                                 " does not exist. Check input properties.");
   }
@@ -188,7 +188,7 @@ SpecularReflectionAlgorithm::getDetectorComponent(
       componentToCorrect = this->getPropertyValue("DetectorComponentName");
     }
     searchResult = inst->getComponentByName(componentToCorrect);
-    if (searchResult == NULL) {
+    if (searchResult == nullptr) {
       throw std::invalid_argument(componentToCorrect +
                                   " does not exist. Check input properties.");
     }
diff --git a/Framework/Algorithms/src/SphericalAbsorption.cpp b/Framework/Algorithms/src/SphericalAbsorption.cpp
index e8cacb05c90b224b0426da8e33f929350adb783d..12ac3bf03687312d10cd295e4c241269f8b703a8 100644
--- a/Framework/Algorithms/src/SphericalAbsorption.cpp
+++ b/Framework/Algorithms/src/SphericalAbsorption.cpp
@@ -27,7 +27,7 @@ using namespace API;
 using namespace DataObjects;
 
 SphericalAbsorption::SphericalAbsorption()
-    : API::Algorithm(), m_inputWS(), m_sampleObject(NULL), m_beamDirection(),
+    : API::Algorithm(), m_inputWS(), m_sampleObject(nullptr), m_beamDirection(),
       m_L1s(), m_elementVolumes(), m_elementPositions(), m_numVolumeElements(0),
       m_sampleVolume(0.), m_refAtten(0.0), m_scattering(0.), n_lambda(0),
       x_step(0), m_emode(0), m_lambdaFixed(0.) {}
diff --git a/Framework/Algorithms/src/SumEventsByLogValue.cpp b/Framework/Algorithms/src/SumEventsByLogValue.cpp
index 48f47cff4a6f2b0af50d291e0cf097fc4f95d5ae..fac299d035638b1deae3e36446672c759698b2e4 100644
--- a/Framework/Algorithms/src/SumEventsByLogValue.cpp
+++ b/Framework/Algorithms/src/SumEventsByLogValue.cpp
@@ -74,7 +74,7 @@ std::map<std::string, std::string> SumEventsByLogValue::validateInputs() {
   try {
     ITimeSeriesProperty *log = dynamic_cast<ITimeSeriesProperty *>(
         m_inputWorkspace->run().getLogData(m_logName));
-    if (log == NULL) {
+    if (log == nullptr) {
       errors["LogName"] = "'" + m_logName + "' is not a time-series log.";
       return errors;
     }
@@ -105,7 +105,7 @@ void SumEventsByLogValue::exec() {
   m_binningParams = getProperty("OutputBinning");
   // Binning parameters must be provided for floating point logs
   if (m_binningParams.empty()) {
-    if (intLog != NULL) {
+    if (intLog != nullptr) {
       createTableOutput(intLog);
     } else {
       throw std::invalid_argument(
@@ -113,9 +113,9 @@ void SumEventsByLogValue::exec() {
     }
   } else // Binning parameters have been given
   {
-    if (intLog != NULL) {
+    if (intLog != nullptr) {
       createBinnedOutput(intLog);
-    } else if (dblLog != NULL) {
+    } else if (dblLog != nullptr) {
       createBinnedOutput(dblLog);
     }
     // else if ( dynamic_cast<const TimeSeriesProperty<std::string>*>(log) !=
@@ -189,13 +189,13 @@ void SumEventsByLogValue::createTableOutput(
   // value
   auto protonChgCol = outputWorkspace->addColumn("double", "proton_charge");
   // Get hold of the proton charge log for later
-  const TimeSeriesProperty<double> *protonChargeLog = NULL;
+  const TimeSeriesProperty<double> *protonChargeLog = nullptr;
   try {
     protonChargeLog =
         m_inputWorkspace->run().getTimeSeriesProperty<double>("proton_charge");
     // Set back to NULL if the log is empty or bad things will happen later
     if (protonChargeLog->realSize() == 0)
-      protonChargeLog = NULL;
+      protonChargeLog = nullptr;
   } catch (std::exception &) {
     // Log and carry on if not found. Column will be left empty.
     g_log.warning("proton_charge log not found in workspace.");
@@ -357,7 +357,7 @@ SumEventsByLogValue::getNumberSeriesLogs() {
     // Try to cast to an ITimeSeriesProperty
     auto tsp = dynamic_cast<const ITimeSeriesProperty *>(*log);
     // Move on to the next one if this is not a TSP
-    if (tsp == NULL)
+    if (tsp == nullptr)
       continue;
     // Don't keep ones with only one entry
     // if ( tsp->realSize() < 2 ) continue;
diff --git a/Framework/Algorithms/src/Transpose.cpp b/Framework/Algorithms/src/Transpose.cpp
index 194f41ee9e0f85dfb35137b00fd02de8eb264966..1bd4831ac275a0923bd3e60cd7b3d88154e4781a 100644
--- a/Framework/Algorithms/src/Transpose.cpp
+++ b/Framework/Algorithms/src/Transpose.cpp
@@ -104,7 +104,7 @@ API::MatrixWorkspace_sptr Transpose::createOutputWorkspace(
 
   // Create a new numeric axis for Y the same length as the old X array
   // Values come from input X
-  API::NumericAxis *newYAxis(NULL);
+  API::NumericAxis *newYAxis(nullptr);
   if (inputWorkspace->isHistogramData()) {
     newYAxis = new API::BinEdgeAxis(inX);
   } else {
diff --git a/Framework/Algorithms/src/UnaryOperation.cpp b/Framework/Algorithms/src/UnaryOperation.cpp
index b0949638a666fe439d54af9e9bdf3d88509e4b33..b980175642d75473767d1d6b4e4e7b2f09f36c2a 100644
--- a/Framework/Algorithms/src/UnaryOperation.cpp
+++ b/Framework/Algorithms/src/UnaryOperation.cpp
@@ -42,7 +42,7 @@ void UnaryOperation::exec() {
   // Check if it is an event workspace
   EventWorkspace_const_sptr eventW =
       boost::dynamic_pointer_cast<const EventWorkspace>(in_work);
-  if ((eventW != NULL) && !(this->useHistogram)) {
+  if ((eventW != nullptr) && !(this->useHistogram)) {
     this->execEvent();
     return;
   }
diff --git a/Framework/Algorithms/src/UnwrapMonitor.cpp b/Framework/Algorithms/src/UnwrapMonitor.cpp
index 75f157e303c869f8998128214aba0449a2aa25f7..6a30adf50ffc8c29bee78f29c2f2e2b60b1737d9 100644
--- a/Framework/Algorithms/src/UnwrapMonitor.cpp
+++ b/Framework/Algorithms/src/UnwrapMonitor.cpp
@@ -22,13 +22,13 @@ using namespace API;
 /// Default constructor
 UnwrapMonitor::UnwrapMonitor()
     : m_conversionConstant(0.), m_inputWS(), m_LRef(0.), m_Tmin(0.), m_Tmax(0.),
-      m_XSize(0), m_progress(NULL) {}
+      m_XSize(0), m_progress(nullptr) {}
 
 /// Destructor
 UnwrapMonitor::~UnwrapMonitor() {
   if (m_progress)
     delete m_progress;
-  m_progress = NULL;
+  m_progress = nullptr;
 }
 
 /// Initialisation method
diff --git a/Framework/Algorithms/src/UnwrapSNS.cpp b/Framework/Algorithms/src/UnwrapSNS.cpp
index 0c9a7eb777777fa8d7519ea6f15dc8c119f43bb0..bcb2ef387410a41bf981a8f04af02522dfdf9691 100644
--- a/Framework/Algorithms/src/UnwrapSNS.cpp
+++ b/Framework/Algorithms/src/UnwrapSNS.cpp
@@ -31,13 +31,13 @@ using std::size_t;
 UnwrapSNS::UnwrapSNS()
     : m_conversionConstant(0.), m_inputWS(), m_inputEvWS(), m_LRef(0.),
       m_L1(0.), m_Tmin(0.), m_Tmax(0.), m_frameWidth(0.), m_numberOfSpectra(0),
-      m_XSize(0), m_progress(NULL) {}
+      m_XSize(0), m_progress(nullptr) {}
 
 /// Destructor
 UnwrapSNS::~UnwrapSNS() {
   if (m_progress)
     delete m_progress;
-  m_progress = NULL;
+  m_progress = nullptr;
 }
 
 /// Algorithm's name for identification overriding a virtual method
@@ -123,7 +123,7 @@ void UnwrapSNS::exec() {
 
   // go off and do the event version if appropriate
   m_inputEvWS = boost::dynamic_pointer_cast<const EventWorkspace>(m_inputWS);
-  if ((m_inputEvWS != NULL)) // && ! this->getProperty("ForceHist")) // TODO
+  if ((m_inputEvWS != nullptr)) // && ! this->getProperty("ForceHist")) // TODO
                              // remove ForceHist option
   {
     this->execEvent();
@@ -333,7 +333,7 @@ void UnwrapSNS::getTofRangeData(const bool isEvent) {
     double dataTmin;
     double dataTmax;
     if (isEvent) {
-      m_inputEvWS->sortAll(DataObjects::TOF_SORT, NULL);
+      m_inputEvWS->sortAll(DataObjects::TOF_SORT, nullptr);
       m_inputEvWS->getEventXMinMax(dataTmin, dataTmax);
     } else {
       m_inputWS->getXMinMax(dataTmin, dataTmax);
diff --git a/Framework/Algorithms/src/WeightedMeanOfWorkspace.cpp b/Framework/Algorithms/src/WeightedMeanOfWorkspace.cpp
index 4703eb91d2f8810ff1dca33cc95c7f8986bf8c3f..d5d5b261d04c806b58e53e095bd90613a5906be1 100644
--- a/Framework/Algorithms/src/WeightedMeanOfWorkspace.cpp
+++ b/Framework/Algorithms/src/WeightedMeanOfWorkspace.cpp
@@ -60,7 +60,7 @@ void WeightedMeanOfWorkspace::exec() {
   // Check if it is an event workspace
   EventWorkspace_const_sptr eventW =
       boost::dynamic_pointer_cast<const EventWorkspace>(inputWS);
-  if (eventW != NULL) {
+  if (eventW != nullptr) {
     throw std::runtime_error(
         "WeightedMeanOfWorkspace cannot handle EventWorkspaces!");
   }
diff --git a/Framework/Algorithms/src/WorkspaceJoiners.cpp b/Framework/Algorithms/src/WorkspaceJoiners.cpp
index 33ffe0654df30b75999f29e6d08db8d8ad4d1158..baaac9dde5d8e5e021cbc859b7e8909f7d9271f2 100644
--- a/Framework/Algorithms/src/WorkspaceJoiners.cpp
+++ b/Framework/Algorithms/src/WorkspaceJoiners.cpp
@@ -12,7 +12,7 @@ using namespace DataObjects;
 
 /** Constructor
  */
-WorkspaceJoiners::WorkspaceJoiners() : Algorithm(), m_progress(NULL) {}
+WorkspaceJoiners::WorkspaceJoiners() : Algorithm(), m_progress(nullptr) {}
 
 /** Destructor
  */
diff --git a/Framework/Crystal/src/AnvredCorrection.cpp b/Framework/Crystal/src/AnvredCorrection.cpp
index 7fb3e10acdb2dd95074dc01013ea861b6ccd42d3..9d95da937310ab0e082a5acaf8a62da01c60c530 100644
--- a/Framework/Crystal/src/AnvredCorrection.cpp
+++ b/Framework/Crystal/src/AnvredCorrection.cpp
@@ -146,8 +146,8 @@ void AnvredCorrection::exec() {
 
   eventW = boost::dynamic_pointer_cast<EventWorkspace>(m_inputWS);
   if (eventW)
-    eventW->sortAll(TOF_SORT, NULL);
-  if ((getProperty("PreserveEvents")) && (eventW != NULL) &&
+    eventW->sortAll(TOF_SORT, nullptr);
+  if ((getProperty("PreserveEvents")) && (eventW != nullptr) &&
       !m_returnTransmissionOnly) {
     // Input workspace is an event workspace. Use the other exec method
     this->execEvent();
@@ -272,7 +272,7 @@ void AnvredCorrection::execEvent() {
   correctionFactors = boost::dynamic_pointer_cast<EventWorkspace>(
       API::WorkspaceFactory::Instance().create("EventWorkspace", numHists, 2,
                                                1));
-  correctionFactors->sortAll(TOF_SORT, NULL);
+  correctionFactors->sortAll(TOF_SORT, nullptr);
   // Copy required stuff from it
   API::WorkspaceFactory::Instance().initializeFromParent(
       m_inputWS, correctionFactors, true);
diff --git a/Framework/Crystal/src/CentroidPeaks.cpp b/Framework/Crystal/src/CentroidPeaks.cpp
index 875cfecb80e11ecd90d45d1cbda4ece2fe7806ae..214983eb992f5260d38c220ef553104e48387e6d 100644
--- a/Framework/Crystal/src/CentroidPeaks.cpp
+++ b/Framework/Crystal/src/CentroidPeaks.cpp
@@ -339,7 +339,7 @@ void CentroidPeaks::exec() {
 
   eventW = boost::dynamic_pointer_cast<const EventWorkspace>(inWS);
   if (eventW) {
-    eventW->sortAll(TOF_SORT, NULL);
+    eventW->sortAll(TOF_SORT, nullptr);
     this->integrateEvent();
   } else {
     this->integrate();
diff --git a/Framework/Crystal/src/ConnectedComponentLabeling.cpp b/Framework/Crystal/src/ConnectedComponentLabeling.cpp
index aa183dc399ab9514a9029b1936344a0b4db1a334..6a82a40ce41f0d2c340f3a0e148a29a39ca73be8 100644
--- a/Framework/Crystal/src/ConnectedComponentLabeling.cpp
+++ b/Framework/Crystal/src/ConnectedComponentLabeling.cpp
@@ -368,7 +368,7 @@ ClusterMap ConnectedComponentLabeling::calculateDisjointTree(
     clusterMap = clusterRegister.clusters(neighbourElements);
 
   } else {
-    API::IMDIterator *iterator = ws->createIterator(NULL);
+    API::IMDIterator *iterator = ws->createIterator(nullptr);
     VecEdgeIndexPair edgeIndexPair; // This should never get filled in a single
                                     // threaded situation.
     size_t endLabelId = doConnectedComponentLabeling(
diff --git a/Framework/Crystal/src/FilterPeaks.cpp b/Framework/Crystal/src/FilterPeaks.cpp
index 374e0812b72cafeb124a45bcdc96c26794230295..558c44ae472594cd35a287f03040df89cb0cc49f 100644
--- a/Framework/Crystal/src/FilterPeaks.cpp
+++ b/Framework/Crystal/src/FilterPeaks.cpp
@@ -94,7 +94,7 @@ void FilterPeaks::exec() {
   filteredWS->copyExperimentInfoFrom(inputWS.get());
 
   const std::string FilterVariable = getProperty("FilterVariable");
-  double (*filterFunction)(const Mantid::Geometry::IPeak &) = 0;
+  double (*filterFunction)(const Mantid::Geometry::IPeak &) = nullptr;
   if (FilterVariable == "h+k+l")
     filterFunction = &HKLSum;
   else if (FilterVariable == "h^2+k^2+l^2")
diff --git a/Framework/Crystal/src/GoniometerAnglesFromPhiRotation.cpp b/Framework/Crystal/src/GoniometerAnglesFromPhiRotation.cpp
index 8f8e0f8e59466530bf596784d8bf106ebd6d8f74..b5fa039b39c9c4bd4ee238ecc50f4c5c6c25885e 100644
--- a/Framework/Crystal/src/GoniometerAnglesFromPhiRotation.cpp
+++ b/Framework/Crystal/src/GoniometerAnglesFromPhiRotation.cpp
@@ -199,7 +199,7 @@ void GoniometerAnglesFromPhiRotation::exec() {
   PeaksWorkspace_sptr Peakss = getProperty("PeaksWorkspace2");
 
   if (!Run1HasOrientedLattice)
-    PeaksRun1->mutableSample().setOrientedLattice(NULL);
+    PeaksRun1->mutableSample().setOrientedLattice(nullptr);
 
   double dphi = (double)getProperty("Phi2") - (double)getProperty("Run1Phi");
   Kernel::Matrix<double> Gon22(3, 3, true);
diff --git a/Framework/Crystal/src/IntegratePeakTimeSlices.cpp b/Framework/Crystal/src/IntegratePeakTimeSlices.cpp
index 92558503c80fd9fed7c50e719f19c17ddd805321..d64676ab04a60db9f058d3bc18d8ff741d75fa7c 100644
--- a/Framework/Crystal/src/IntegratePeakTimeSlices.cpp
+++ b/Framework/Crystal/src/IntegratePeakTimeSlices.cpp
@@ -188,7 +188,7 @@ void IntegratePeakTimeSlices::init() {
 void IntegratePeakTimeSlices::exec() {
   time_t seconds1;
 
-  seconds1 = time(NULL);
+  seconds1 = time(nullptr);
 
   double dQ = getProperty("PeakQspan");
 
@@ -630,7 +630,7 @@ void IntegratePeakTimeSlices::exec() {
     setProperty("SigmaIntensity", SQRT(TotVariance));
     time_t seconds2;
 
-    seconds2 = time(NULL);
+    seconds2 = time(nullptr);
     double dif = difftime(seconds2, seconds1);
     g_log.debug() << "Finished Integr peak number " << indx << " in " << dif
                   << " seconds" << std::endl;
diff --git a/Framework/Crystal/src/LoadHKL.cpp b/Framework/Crystal/src/LoadHKL.cpp
index f58e8609a8352212dd4accaea248ea35c4c30f5e..28606a89686a56eea60952ba1b0de487b78c27bf 100644
--- a/Framework/Crystal/src/LoadHKL.cpp
+++ b/Framework/Crystal/src/LoadHKL.cpp
@@ -59,7 +59,7 @@ void LoadHKL::exec() {
   //    DN, TWOTH, DSP))
   // HKL is flipped by -1 due to different q convention in ISAW vs mantid.
   Instrument_sptr inst(new Geometry::Instrument);
-  Detector *detector = new Detector("det1", -1, 0);
+  Detector *detector = new Detector("det1", -1, nullptr);
   detector->setPos(0.0, 0.0, 0.0);
   inst->add(detector); // This takes care of deletion
   inst->markAsDetector(detector);
diff --git a/Framework/Crystal/src/LoadIsawPeaks.cpp b/Framework/Crystal/src/LoadIsawPeaks.cpp
index 839acbadf6f0ee3e9d089e73f28288a94b3d9e69..0987169c2f725c62afe1ea4134548715644c52ff 100644
--- a/Framework/Crystal/src/LoadIsawPeaks.cpp
+++ b/Framework/Crystal/src/LoadIsawPeaks.cpp
@@ -373,23 +373,23 @@ DataObjects::Peak LoadIsawPeaks::readPeak(PeaksWorkspace_sptr outWS,
 
   seqNum = atoi(getWord(in, false).c_str());
 
-  h = strtod(getWord(in, false).c_str(), 0);
-  k = strtod(getWord(in, false).c_str(), 0);
-  l = strtod(getWord(in, false).c_str(), 0);
-
-  col = strtod(getWord(in, false).c_str(), 0);
-  row = strtod(getWord(in, false).c_str(), 0);
-  strtod(getWord(in, false).c_str(), 0); // chan
-  strtod(getWord(in, false).c_str(), 0); // L2
-  strtod(getWord(in, false).c_str(), 0); // ScatAng
-
-  strtod(getWord(in, false).c_str(), 0); // Az
-  wl = strtod(getWord(in, false).c_str(), 0);
-  strtod(getWord(in, false).c_str(), 0); // D
-  IPK = strtod(getWord(in, false).c_str(), 0);
-
-  Inti = strtod(getWord(in, false).c_str(), 0);
-  SigI = strtod(getWord(in, false).c_str(), 0);
+  h = strtod(getWord(in, false).c_str(), nullptr);
+  k = strtod(getWord(in, false).c_str(), nullptr);
+  l = strtod(getWord(in, false).c_str(), nullptr);
+
+  col = strtod(getWord(in, false).c_str(), nullptr);
+  row = strtod(getWord(in, false).c_str(), nullptr);
+  strtod(getWord(in, false).c_str(), nullptr); // chan
+  strtod(getWord(in, false).c_str(), nullptr); // L2
+  strtod(getWord(in, false).c_str(), nullptr); // ScatAng
+
+  strtod(getWord(in, false).c_str(), nullptr); // Az
+  wl = strtod(getWord(in, false).c_str(), nullptr);
+  strtod(getWord(in, false).c_str(), nullptr); // D
+  IPK = strtod(getWord(in, false).c_str(), nullptr);
+
+  Inti = strtod(getWord(in, false).c_str(), nullptr);
+  SigI = strtod(getWord(in, false).c_str(), nullptr);
   static_cast<void>(atoi(getWord(in, false).c_str())); // iReflag
 
   // Finish the line and get the first word of next line
@@ -486,11 +486,11 @@ std::string LoadIsawPeaks::readPeakBlockHeader(std::string lastStr,
 
   run = atoi(getWord(in, false).c_str());
   detName = atoi(getWord(in, false).c_str());
-  chi = strtod(getWord(in, false).c_str(), 0);
-  phi = strtod(getWord(in, false).c_str(), 0);
+  chi = strtod(getWord(in, false).c_str(), nullptr);
+  phi = strtod(getWord(in, false).c_str(), nullptr);
 
-  omega = strtod(getWord(in, false).c_str(), 0);
-  monCount = strtod(getWord(in, false).c_str(), 0);
+  omega = strtod(getWord(in, false).c_str(), nullptr);
+  monCount = strtod(getWord(in, false).c_str(), nullptr);
   readToEndOfLine(in, true);
 
   return getWord(in, false);
diff --git a/Framework/Crystal/src/LoadIsawUB.cpp b/Framework/Crystal/src/LoadIsawUB.cpp
index a4521d204b6970f6df29504e2e2e5b72d27c530c..e3679a360f981a2b25ffefc106c960c0d4b1aab3 100644
--- a/Framework/Crystal/src/LoadIsawUB.cpp
+++ b/Framework/Crystal/src/LoadIsawUB.cpp
@@ -57,7 +57,7 @@ void LoadIsawUB::exec() {
   ExperimentInfo_sptr ws;
   IMDEventWorkspace_sptr MDWS =
       boost::dynamic_pointer_cast<IMDEventWorkspace>(ws1);
-  if (MDWS != NULL) {
+  if (MDWS != nullptr) {
     ws = MDWS->getExperimentInfo(0);
   } else {
     ws = boost::dynamic_pointer_cast<ExperimentInfo>(ws1);
@@ -126,7 +126,7 @@ void LoadIsawUB::exec() {
   ws->mutableSample().setOrientedLattice(latt);
 
   // Save it to every experiment info in MD workspaces
-  if ((MDWS != NULL) && (MDWS->getNumExperimentInfo() > 1)) {
+  if ((MDWS != nullptr) && (MDWS->getNumExperimentInfo() > 1)) {
     for (uint16_t i = 1; i < MDWS->getNumExperimentInfo(); i++) {
       ws = MDWS->getExperimentInfo(i);
       ws->mutableSample().setOrientedLattice(latt);
diff --git a/Framework/Crystal/src/OptimizeExtinctionParameters.cpp b/Framework/Crystal/src/OptimizeExtinctionParameters.cpp
index f52313952078931c092fb49f01d12b1a1282f2d5..44c9e7b4a850a3f0698bc1268c63508337573899 100644
--- a/Framework/Crystal/src/OptimizeExtinctionParameters.cpp
+++ b/Framework/Crystal/src/OptimizeExtinctionParameters.cpp
@@ -119,7 +119,7 @@ void OptimizeExtinctionParameters::exec() {
   par[3] = strwi.str();
 
   const gsl_multimin_fminimizer_type *T = gsl_multimin_fminimizer_nmsimplex;
-  gsl_multimin_fminimizer *s = NULL;
+  gsl_multimin_fminimizer *s = nullptr;
   gsl_vector *ss, *x;
   gsl_multimin_function minex_func;
 
diff --git a/Framework/Crystal/src/PeakIntegration.cpp b/Framework/Crystal/src/PeakIntegration.cpp
index 07ab9a5b913d9f2db9b4ad4444f0b559f5a72576..f0b5c7a4d2d29aa011ecd6b21b7d5073f41fec4d 100644
--- a/Framework/Crystal/src/PeakIntegration.cpp
+++ b/Framework/Crystal/src/PeakIntegration.cpp
@@ -94,7 +94,7 @@ void PeakIntegration::exec() {
   EventWorkspace_const_sptr inWS =
       boost::dynamic_pointer_cast<const EventWorkspace>(inputW);
   if (inWS) {
-    inWS->sortAll(TOF_SORT, NULL);
+    inWS->sortAll(TOF_SORT, nullptr);
   }
 
   // Get some stuff from the input workspace
diff --git a/Framework/Crystal/src/SaveIsawUB.cpp b/Framework/Crystal/src/SaveIsawUB.cpp
index d9b2f4b35450be47802d1de93bb08fcceaac6c3d..7e79a5c1a9d7060fc9f8f081475418e649e7de1a 100644
--- a/Framework/Crystal/src/SaveIsawUB.cpp
+++ b/Framework/Crystal/src/SaveIsawUB.cpp
@@ -93,7 +93,7 @@ void SaveIsawUB::exec() {
     ExperimentInfo_sptr ws;
     IMDEventWorkspace_sptr MDWS =
         boost::dynamic_pointer_cast<IMDEventWorkspace>(ws1);
-    if (MDWS != NULL) {
+    if (MDWS != nullptr) {
       ws = MDWS->getExperimentInfo(0);
     } else {
       ws = boost::dynamic_pointer_cast<ExperimentInfo>(ws1);
diff --git a/Framework/Crystal/src/SetUB.cpp b/Framework/Crystal/src/SetUB.cpp
index 3303c2f5d3227af60f611f26c3890aab927a61b8..e4bb51e9678dd217d0e787d19ea28acfca61dcc8 100644
--- a/Framework/Crystal/src/SetUB.cpp
+++ b/Framework/Crystal/src/SetUB.cpp
@@ -124,7 +124,7 @@ void SetUB::exec() {
   // Sample copy;
   IMDEventWorkspace_sptr mdws =
       boost::dynamic_pointer_cast<IMDEventWorkspace>(ws);
-  if (mdws != NULL) {
+  if (mdws != nullptr) {
     int sampleNumber = getProperty("MDSampleNumber");
     if ((sampleNumber == EMPTY_INT()) ||
         (sampleNumber < 0)) // copy to all samples
diff --git a/Framework/Crystal/src/SortPeaksWorkspace.cpp b/Framework/Crystal/src/SortPeaksWorkspace.cpp
index 61f7d502290f4e9b9ef77adf6c34ad903582a988..c8047e7245ae802e6d9444e10fdcecf7a1c96bcc 100644
--- a/Framework/Crystal/src/SortPeaksWorkspace.cpp
+++ b/Framework/Crystal/src/SortPeaksWorkspace.cpp
@@ -59,9 +59,9 @@ void SortPeaksWorkspace::init() {
 PeaksWorkspace_sptr SortPeaksWorkspace::tryFetchOutputWorkspace() const {
   IPeaksWorkspace_sptr temp = getProperty("OutputWorkspace");
   PeaksWorkspace_sptr outputWS;
-  if (temp != NULL) {
+  if (temp != nullptr) {
     outputWS = boost::dynamic_pointer_cast<PeaksWorkspace>(temp);
-    if (outputWS == NULL) {
+    if (outputWS == nullptr) {
       throw std::invalid_argument("OutputWorkspace is not a PeaksWorkspace.");
     }
   }
@@ -72,7 +72,7 @@ PeaksWorkspace_sptr SortPeaksWorkspace::tryFetchInputWorkspace() const {
   IPeaksWorkspace_sptr temp = getProperty("InputWorkspace");
   PeaksWorkspace_sptr inputWS =
       boost::dynamic_pointer_cast<PeaksWorkspace>(temp);
-  if (inputWS == NULL) {
+  if (inputWS == nullptr) {
     throw std::invalid_argument("InputWorkspace is not a PeaksWorkspace.");
   }
   return inputWS;
diff --git a/Framework/CurveFitting/src/Algorithms/CalculateGammaBackground.cpp b/Framework/CurveFitting/src/Algorithms/CalculateGammaBackground.cpp
index 2586dd49c2a092a6643104f1118a88319c0d76e2..a47307980ffe346fbe85d1db101beb6e9fd7deac 100644
--- a/Framework/CurveFitting/src/Algorithms/CalculateGammaBackground.cpp
+++ b/Framework/CurveFitting/src/Algorithms/CalculateGammaBackground.cpp
@@ -54,7 +54,7 @@ CalculateGammaBackground::CalculateGammaBackground()
     : Algorithm(), m_inputWS(), m_indices(), m_profileFunction(), m_npeaks(0),
       m_reversed(), m_samplePos(), m_l1(0.0), m_foilRadius(0.0),
       m_foilUpMin(0.0), m_foilUpMax(0.0), m_foils0(), m_foils1(),
-      m_backgroundWS(), m_correctedWS(), m_progress(NULL) {}
+      m_backgroundWS(), m_correctedWS(), m_progress(nullptr) {}
 
 /// Destructor
 CalculateGammaBackground::~CalculateGammaBackground() {
diff --git a/Framework/CurveFitting/src/Algorithms/CalculateMSVesuvio.cpp b/Framework/CurveFitting/src/Algorithms/CalculateMSVesuvio.cpp
index fe23d129f2dc779767d1ea5d0aad7ad4ffe28202..1d2015159b29accc7707d6da7159e142e91055a6 100644
--- a/Framework/CurveFitting/src/Algorithms/CalculateMSVesuvio.cpp
+++ b/Framework/CurveFitting/src/Algorithms/CalculateMSVesuvio.cpp
@@ -51,13 +51,13 @@ DECLARE_ALGORITHM(CalculateMSVesuvio)
 
 /// Constructor
 CalculateMSVesuvio::CalculateMSVesuvio()
-    : Algorithm(), m_randgen(NULL), m_acrossIdx(0), m_upIdx(1), m_beamIdx(3),
+    : Algorithm(), m_randgen(nullptr), m_acrossIdx(0), m_upIdx(1), m_beamIdx(3),
       m_beamDir(), m_srcR2(0.0), m_halfSampleHeight(0.0),
-      m_halfSampleWidth(0.0), m_halfSampleThick(0.0), m_sampleShape(NULL),
-      m_sampleProps(NULL), m_detHeight(-1.0), m_detWidth(-1.0),
+      m_halfSampleWidth(0.0), m_halfSampleThick(0.0), m_sampleShape(nullptr),
+      m_sampleProps(nullptr), m_detHeight(-1.0), m_detWidth(-1.0),
       m_detThick(-1.0), m_tmin(-1.0), m_tmax(-1.0), m_delt(-1.0),
       m_foilRes(-1.0), m_nscatters(0), m_nruns(0), m_nevents(0),
-      m_progress(NULL), m_inputWS() {}
+      m_progress(nullptr), m_inputWS() {}
 
 /// Destructor
 CalculateMSVesuvio::~CalculateMSVesuvio() {
diff --git a/Framework/CurveFitting/src/Algorithms/ConvolveWorkspaces.cpp b/Framework/CurveFitting/src/Algorithms/ConvolveWorkspaces.cpp
index 860d527201a1ef0c1501070ca0fb35f7b680b631..99cba60f9ec5aa9175027ca6a1e5393da23aeec0 100644
--- a/Framework/CurveFitting/src/Algorithms/ConvolveWorkspaces.cpp
+++ b/Framework/CurveFitting/src/Algorithms/ConvolveWorkspaces.cpp
@@ -17,7 +17,7 @@ namespace Algorithms {
 DECLARE_ALGORITHM(ConvolveWorkspaces)
 
 /// Constructor
-ConvolveWorkspaces::ConvolveWorkspaces() : API::Algorithm(), prog(NULL) {}
+ConvolveWorkspaces::ConvolveWorkspaces() : API::Algorithm(), prog(nullptr) {}
 
 /// Virtual destructor
 ConvolveWorkspaces::~ConvolveWorkspaces() { delete prog; }
diff --git a/Framework/CurveFitting/src/Algorithms/Fit1D.cpp b/Framework/CurveFitting/src/Algorithms/Fit1D.cpp
index 3e5187b44c4f15868be41430535ae6f2e1819518..5dc297bf0f9f69125997d213ff97aa8517370f53 100644
--- a/Framework/CurveFitting/src/Algorithms/Fit1D.cpp
+++ b/Framework/CurveFitting/src/Algorithms/Fit1D.cpp
@@ -35,7 +35,7 @@ using API::Jacobian;
 class JacobianImpl : public Jacobian {
 public:
   /// Default constructor
-  JacobianImpl() : Jacobian(), m_J(NULL){};
+  JacobianImpl() : Jacobian(), m_J(nullptr){};
 
   /// The index map
   std::map<int, int> m_map;
@@ -315,7 +315,7 @@ void Fit1D::exec() {
 
   // check if derivative defined in derived class
   bool isDerivDefined = true;
-  gsl_matrix *M = NULL;
+  gsl_matrix *M = nullptr;
   try {
     const std::vector<double> inTest(m_parameterNames.size(), 1.0);
     std::vector<double> outTest(m_parameterNames.size());
@@ -491,7 +491,7 @@ void Fit1D::exec() {
   // set-up remaining GSL machinery for least squared
 
   const gsl_multifit_fdfsolver_type *T = gsl_multifit_fdfsolver_lmsder;
-  gsl_multifit_fdfsolver *s = NULL;
+  gsl_multifit_fdfsolver *s = nullptr;
   if (isDerivDefined) {
     s = gsl_multifit_fdfsolver_alloc(T, l_data.n, l_data.p);
     gsl_multifit_fdfsolver_set(s, &f, initFuncArg);
@@ -501,8 +501,8 @@ void Fit1D::exec() {
 
   const gsl_multimin_fminimizer_type *simplexType =
       gsl_multimin_fminimizer_nmsimplex;
-  gsl_multimin_fminimizer *simplexMinimizer = NULL;
-  gsl_vector *simplexStepSize = NULL;
+  gsl_multimin_fminimizer *simplexMinimizer = nullptr;
+  gsl_vector *simplexStepSize = nullptr;
   if (!isDerivDefined) {
     simplexMinimizer = gsl_multimin_fminimizer_alloc(simplexType, l_data.p);
     simplexStepSize = gsl_vector_alloc(l_data.p);
@@ -589,7 +589,7 @@ void Fit1D::exec() {
   if (!output.empty()) {
     // calculate covariance matrix if derivatives available
 
-    gsl_matrix *covar(NULL);
+    gsl_matrix *covar(nullptr);
     std::vector<double> standardDeviations;
     std::vector<double> sdExtended;
     if (isDerivDefined) {
@@ -751,8 +751,8 @@ void Fit1D::exec() {
  *   @param fixed :: A list of comma separated names of the fixed parameters.
  */
 FitData::FitData(Fit1D *fit, const std::string &fixed)
-    : n(0), X(NULL), Y(NULL), sigmaData(NULL), fit1D(fit),
-      forSimplexLSwrap(NULL), parameters(NULL) {
+    : n(0), X(nullptr), Y(nullptr), sigmaData(nullptr), fit1D(fit),
+      forSimplexLSwrap(nullptr), parameters(nullptr) {
   typedef boost::tokenizer<boost::char_separator<char>> tokenizer;
   boost::char_separator<char> sep(",");
   boost::tokenizer<boost::char_separator<char>> names(fixed, sep);
diff --git a/Framework/CurveFitting/src/Algorithms/LeBailFit.cpp b/Framework/CurveFitting/src/Algorithms/LeBailFit.cpp
index 91212a986eaf449bda0939a2c4f71dde3be92ace..4db7cffda5dfefff46a4a553f97df3b6c21c7c09 100644
--- a/Framework/CurveFitting/src/Algorithms/LeBailFit.cpp
+++ b/Framework/CurveFitting/src/Algorithms/LeBailFit.cpp
@@ -1449,7 +1449,7 @@ void LeBailFit::createOutputDataWorkspace() {
   // 4. Set axis
   m_outputWS->getAxis(0)->setUnit("TOF");
 
-  API::TextAxis *tAxis = 0;
+  API::TextAxis *tAxis = nullptr;
   tAxis = new API::TextAxis(nspec);
   tAxis->setLabel(0, "Data");
   tAxis->setLabel(1, "Calc");
diff --git a/Framework/CurveFitting/src/FitMW.cpp b/Framework/CurveFitting/src/FitMW.cpp
index bbe2dac42bb69e88925faba77661efc6453b1f09..e659155e45f407e953261fbfba9b430119808c86 100644
--- a/Framework/CurveFitting/src/FitMW.cpp
+++ b/Framework/CurveFitting/src/FitMW.cpp
@@ -86,7 +86,7 @@ FitMW::FitMW(Kernel::IPropertyManager *fit,
  * @param domainType :: Type of the domain: Simple, Sequential, or Parallel.
  */
 FitMW::FitMW(FitMW::DomainType domainType)
-    : API::IDomainCreator(NULL, std::vector<std::string>(), domainType),
+    : API::IDomainCreator(nullptr, std::vector<std::string>(), domainType),
       m_workspaceIndex(-1), m_startX(EMPTY_DBL()), m_endX(EMPTY_DBL()),
       m_maxSize(10), m_normalise(false), m_startIndex(0) {}
 
diff --git a/Framework/CurveFitting/src/FuncMinimizers/DerivMinimizer.cpp b/Framework/CurveFitting/src/FuncMinimizers/DerivMinimizer.cpp
index 5f54e75d6d7bea7407b1156cb3d8d035f05e59e1..116bb1829f736f03c38802b200402d611adf8982 100644
--- a/Framework/CurveFitting/src/FuncMinimizers/DerivMinimizer.cpp
+++ b/Framework/CurveFitting/src/FuncMinimizers/DerivMinimizer.cpp
@@ -79,7 +79,7 @@ void DerivMinimizer::fundfun(const gsl_vector *x, void *params, double *f,
 
 /// Constructor
 DerivMinimizer::DerivMinimizer()
-    : m_gslSolver(NULL), m_x(NULL), m_stopGradient(1e-3), m_stepSize(0.1),
+    : m_gslSolver(nullptr), m_x(nullptr), m_stopGradient(1e-3), m_stepSize(0.1),
       m_tolerance(0.0001) {
   initGSLMMin();
 }
@@ -90,24 +90,24 @@ DerivMinimizer::DerivMinimizer()
  * @param tolerance :: Tolerance.
  */
 DerivMinimizer::DerivMinimizer(const double stepSize, const double tolerance)
-    : m_gslSolver(NULL), m_x(NULL), m_stopGradient(1e-3), m_stepSize(stepSize),
+    : m_gslSolver(nullptr), m_x(nullptr), m_stopGradient(1e-3), m_stepSize(stepSize),
       m_tolerance(tolerance) {
   initGSLMMin();
 }
 
 void DerivMinimizer::initGSLMMin() {
-  m_gslMultiminContainer.f = NULL;
-  m_gslMultiminContainer.df = NULL;
-  m_gslMultiminContainer.fdf = NULL;
+  m_gslMultiminContainer.f = nullptr;
+  m_gslMultiminContainer.df = nullptr;
+  m_gslMultiminContainer.fdf = nullptr;
   m_gslMultiminContainer.n = 0;
-  m_gslMultiminContainer.params = NULL;
+  m_gslMultiminContainer.params = nullptr;
 }
 
 /**
  * Destructor.
  */
 DerivMinimizer::~DerivMinimizer() {
-  if (m_gslSolver != NULL) {
+  if (m_gslSolver != nullptr) {
     gsl_multimin_fdfminimizer_free(m_gslSolver);
     gsl_vector_free(m_x);
   }
@@ -147,7 +147,7 @@ void DerivMinimizer::initialize(API::ICostFunction_sptr function,
  * @return :: true to continue, false to stop.
  */
 bool DerivMinimizer::iterate(size_t) {
-  if (m_gslSolver == NULL) {
+  if (m_gslSolver == nullptr) {
     throw std::runtime_error("Minimizer " + this->name() +
                              " was not initialized.");
   }
diff --git a/Framework/CurveFitting/src/FuncMinimizers/LevenbergMarquardtMinimizer.cpp b/Framework/CurveFitting/src/FuncMinimizers/LevenbergMarquardtMinimizer.cpp
index df84cfc9f62124e1817e6b462e96fb64a59a7842..11d283e4b35142658d5180b71d4d03652f33df90 100644
--- a/Framework/CurveFitting/src/FuncMinimizers/LevenbergMarquardtMinimizer.cpp
+++ b/Framework/CurveFitting/src/FuncMinimizers/LevenbergMarquardtMinimizer.cpp
@@ -27,7 +27,7 @@ DECLARE_FUNCMINIMIZER(LevenbergMarquardtMinimizer, Levenberg-Marquardt)
 // clang-format on
 
 LevenbergMarquardtMinimizer::LevenbergMarquardtMinimizer()
-    : m_data(NULL), gslContainer(), m_gslSolver(NULL), m_function(),
+    : m_data(nullptr), gslContainer(), m_gslSolver(nullptr), m_function(),
       m_absError(1e-4), m_relError(1e-4) {
   declareProperty("AbsError", m_absError, "Absolute error allowed for "
                                           "parameters - a stopping parameter "
diff --git a/Framework/CurveFitting/src/FuncMinimizers/SimplexMinimizer.cpp b/Framework/CurveFitting/src/FuncMinimizers/SimplexMinimizer.cpp
index e9399ae13f134ee944285d188a5e406dc5698645..351b553e85a2cf49b6585b3545310cc025324342 100644
--- a/Framework/CurveFitting/src/FuncMinimizers/SimplexMinimizer.cpp
+++ b/Framework/CurveFitting/src/FuncMinimizers/SimplexMinimizer.cpp
@@ -42,11 +42,11 @@ double SimplexMinimizer::fun(const gsl_vector *x, void *params) {
 }
 
 SimplexMinimizer::SimplexMinimizer(const double epsabs)
-    : m_epsabs(epsabs), m_costFunction(), m_size(1.0), m_simplexStepSize(NULL),
-      m_startGuess(NULL), m_gslSolver(NULL) {
-  gslContainer.f = NULL;
+    : m_epsabs(epsabs), m_costFunction(), m_size(1.0), m_simplexStepSize(nullptr),
+      m_startGuess(nullptr), m_gslSolver(nullptr) {
+  gslContainer.f = nullptr;
   gslContainer.n = -1;
-  gslContainer.params = NULL;
+  gslContainer.params = nullptr;
 }
 
 void SimplexMinimizer::initialize(API::ICostFunction_sptr function, size_t) {
diff --git a/Framework/CurveFitting/src/FunctionDomain1DSpectrumCreator.cpp b/Framework/CurveFitting/src/FunctionDomain1DSpectrumCreator.cpp
index 67cf46775e390e7348a0e1dde09f935560a04050..d34c4b8cbcfcef6cad26c797962916c5c7ab54f2 100644
--- a/Framework/CurveFitting/src/FunctionDomain1DSpectrumCreator.cpp
+++ b/Framework/CurveFitting/src/FunctionDomain1DSpectrumCreator.cpp
@@ -11,7 +11,7 @@ using namespace API;
  * Default Constructor.
  */
 FunctionDomain1DSpectrumCreator::FunctionDomain1DSpectrumCreator()
-    : IDomainCreator(NULL, std::vector<std::string>(),
+    : IDomainCreator(nullptr, std::vector<std::string>(),
                      FunctionDomain1DSpectrumCreator::Simple),
       m_matrixWorkspace(), m_workspaceIndex(0), m_workspaceIndexIsSet(false) {}
 
diff --git a/Framework/CurveFitting/src/Functions/BivariateNormal.cpp b/Framework/CurveFitting/src/Functions/BivariateNormal.cpp
index 59918f5e1e5e65171378450762c01892f3c9d5f4..97da28e6100d4a853e1a2bbdd628d462ff6e19f3 100644
--- a/Framework/CurveFitting/src/Functions/BivariateNormal.cpp
+++ b/Framework/CurveFitting/src/Functions/BivariateNormal.cpp
@@ -56,7 +56,7 @@ BivariateNormal::BivariateNormal()
     : API::ParamFunction(), CalcVxx(false), CalcVyy(false), CalcVxy(false),
       NCells(0), CalcVariances(false), mIx(0.0), mx(0.0), mIy(0.0), my(0.0),
       SIxx(0.0), SIyy(0.0), SIxy(0.0), Sxx(0.0), Syy(0.0), Sxy(0.0), TotI(0.0),
-      TotN(0.0), Varx0(-1.0), Vary0(-1.0), expVals(NULL), uu(0.0),
+      TotN(0.0), Varx0(-1.0), Vary0(-1.0), expVals(nullptr), uu(0.0),
       coefNorm(0.0), expCoeffx2(0.0), expCoeffy2(0.0), expCoeffxy(0.0) {
   LastParams[IVXX] = -1;
   Varx0 = -1;
@@ -471,7 +471,7 @@ double BivariateNormal::initCommon() {
 
     // CommonsOK = false;
 
-    if (getConstraint(0) == NULL) {
+    if (getConstraint(0) == nullptr) {
 
       addConstraint((new BoundaryConstraint(this, "Background", 0,
                                             Attrib[S_int] / Attrib[S_1])));
@@ -482,20 +482,20 @@ double BivariateNormal::initCommon() {
     if (maxIntensity < 100)
       maxIntensity = 100;
 
-    if (getConstraint(1) == NULL) {
+    if (getConstraint(1) == nullptr) {
       addConstraint(new BoundaryConstraint(this, "Intensity", 0, maxIntensity));
     }
 
     double minMeany = MinY * .9 + .1 * MaxY;
     double maxMeany = MinY * .1 + .9 * MaxY;
 
-    if (getConstraint(3) == NULL) {
+    if (getConstraint(3) == nullptr) {
       addConstraint(new BoundaryConstraint(this, "Mrow", minMeany, maxMeany));
     }
 
     double minMeanx = MinX * .9 + .1 * MaxX;
     double maxMeanx = MinX * .1 + .9 * MaxX;
-    if (getConstraint(2) == NULL) {
+    if (getConstraint(2) == nullptr) {
       addConstraint(new BoundaryConstraint(this, "Mcol", minMeanx, maxMeanx));
     }
 
@@ -508,7 +508,7 @@ double BivariateNormal::initCommon() {
            << Attrib[S_1] << ")/(" << (Attrib[S_int]) << "-Background*"
            << (Attrib[S_1]) << ")";
 
-      if (getTie(IVYY) == NULL) {
+      if (getTie(IVYY) == nullptr) {
         tie("SSrow", ssyy.str());
         CalcVxx = true;
       }
@@ -519,7 +519,7 @@ double BivariateNormal::initCommon() {
            << Attrib[S_1] << ")/(" << (Attrib[S_int]) << "-Background*"
            << (Attrib[S_1]) << ")";
 
-      if (getTie(IVXX) == NULL) {
+      if (getTie(IVXX) == nullptr) {
         tie("SScol", ssxx.str());
         CalcVyy = true;
       }
@@ -530,7 +530,7 @@ double BivariateNormal::initCommon() {
            << Attrib[S_1] << ")/(" << (Attrib[S_int]) << "-Background*"
            << (Attrib[S_1]) << ")";
 
-      if (getTie(IVXY) == NULL) {
+      if (getTie(IVXY) == nullptr) {
         tie("SSrc", ssxy.str());
         CalcVxy = true;
       }
diff --git a/Framework/CurveFitting/src/Functions/Convolution.cpp b/Framework/CurveFitting/src/Functions/Convolution.cpp
index 3040b82b33ab02654240fb8de542a71961c27f5c..0042fb41cef3d8782980352d0dfa69c204cb1f61 100644
--- a/Framework/CurveFitting/src/Functions/Convolution.cpp
+++ b/Framework/CurveFitting/src/Functions/Convolution.cpp
@@ -301,7 +301,7 @@ size_t Convolution::addFunction(IFunction_sptr f) {
     }
     CompositeFunction_sptr cf =
         boost::dynamic_pointer_cast<CompositeFunction>(f1);
-    if (cf == 0) {
+    if (cf == nullptr) {
       cf = boost::dynamic_pointer_cast<CompositeFunction>(
           API::FunctionFactory::Instance().createFunction("CompositeFunction"));
       removeFunction(1);
diff --git a/Framework/CurveFitting/src/Functions/IkedaCarpenterPV.cpp b/Framework/CurveFitting/src/Functions/IkedaCarpenterPV.cpp
index 519f78976bd762d60dcdab2afc56eedbceba0123..bb1900006b200c27a4e8fbcf62e89876d3efaf1b 100644
--- a/Framework/CurveFitting/src/Functions/IkedaCarpenterPV.cpp
+++ b/Framework/CurveFitting/src/Functions/IkedaCarpenterPV.cpp
@@ -144,7 +144,7 @@ void IkedaCarpenterPV::calWavelengthAtEachDataPoint(const double *xValues,
       API::MatrixWorkspace_const_sptr mws = getMatrixWorkspace();
       Instrument_const_sptr instrument = mws->getInstrument();
       Geometry::IComponent_const_sptr sample = instrument->getSample();
-      if (sample != NULL) {
+      if (sample != nullptr) {
         convertValue(m_waveLength, wavelength, mws, m_workspaceIndex);
       } else {
         g_log.warning()
diff --git a/Framework/CurveFitting/src/Functions/Voigt.cpp b/Framework/CurveFitting/src/Functions/Voigt.cpp
index 73ce3f49f9979c516ecceedd0af016ee7b69eaf5..b040d0f95f04c9371733dad94871681687d654c1 100644
--- a/Framework/CurveFitting/src/Functions/Voigt.cpp
+++ b/Framework/CurveFitting/src/Functions/Voigt.cpp
@@ -54,7 +54,7 @@ void Voigt::declareParameters() {
  */
 void Voigt::functionLocal(double *out, const double *xValues,
                           const size_t nData) const {
-  calculateFunctionAndDerivative(xValues, nData, out, NULL);
+  calculateFunctionAndDerivative(xValues, nData, out, nullptr);
 }
 
 /**
@@ -66,7 +66,7 @@ void Voigt::functionLocal(double *out, const double *xValues,
  */
 void Voigt::functionDerivLocal(API::Jacobian *out, const double *xValues,
                                const size_t nData) {
-  calculateFunctionAndDerivative(xValues, nData, NULL, out);
+  calculateFunctionAndDerivative(xValues, nData, nullptr, out);
 }
 
 /**
diff --git a/Framework/CurveFitting/src/GSLMatrix.cpp b/Framework/CurveFitting/src/GSLMatrix.cpp
index 0e1b89547169c1ec0380070d531a6841de61b8e5..b502c185c67c8435c2586deb01d33c57be552340 100644
--- a/Framework/CurveFitting/src/GSLMatrix.cpp
+++ b/Framework/CurveFitting/src/GSLMatrix.cpp
@@ -8,7 +8,7 @@ namespace Mantid {
 namespace CurveFitting {
 
 /// Constructor
-GSLMatrix::GSLMatrix() : m_matrix(NULL) {}
+GSLMatrix::GSLMatrix() : m_matrix(nullptr) {}
 /// Constructor
 /// @param nx :: First dimension
 /// @param ny :: Second dimension
@@ -52,13 +52,13 @@ GSLMatrix::GSLMatrix(const Kernel::Matrix<double> &M) {
 
 /// Create this matrix from a product of two other matrices
 /// @param mult2 :: Matrix multiplication helper object.
-GSLMatrix::GSLMatrix(const GSLMatrixMult2 &mult2) : m_matrix(NULL) {
+GSLMatrix::GSLMatrix(const GSLMatrixMult2 &mult2) : m_matrix(nullptr) {
   *this = mult2;
 }
 
 /// Create this matrix from a product of three other matrices
 /// @param mult3 :: Matrix multiplication helper object.
-GSLMatrix::GSLMatrix(const GSLMatrixMult3 &mult3) : m_matrix(NULL) {
+GSLMatrix::GSLMatrix(const GSLMatrixMult3 &mult3) : m_matrix(nullptr) {
   *this = mult3;
 }
 
@@ -77,7 +77,7 @@ GSLMatrix &GSLMatrix::operator=(const GSLMatrix &M) {
 }
 
 /// Is matrix empty
-bool GSLMatrix::isEmpty() const { return m_matrix == NULL; }
+bool GSLMatrix::isEmpty() const { return m_matrix == nullptr; }
 
 /// Resize the matrix
 /// @param nx :: New first dimension
diff --git a/Framework/CurveFitting/src/IFittingAlgorithm.cpp b/Framework/CurveFitting/src/IFittingAlgorithm.cpp
index 4984b1edc74ed77ea305da877eece95d140f407f..6f9ddf437c27caed196a25517dcf69145d380f9e 100644
--- a/Framework/CurveFitting/src/IFittingAlgorithm.cpp
+++ b/Framework/CurveFitting/src/IFittingAlgorithm.cpp
@@ -27,7 +27,7 @@ IDomainCreator *createDomainCreator(const IFunction *fun, const Workspace *ws,
                                     IPropertyManager *manager,
                                     IDomainCreator::DomainType domainType) {
 
-  IDomainCreator *creator = NULL;
+  IDomainCreator *creator = nullptr;
 
   // ILatticeFunction requires API::LatticeDomain.
   if (dynamic_cast<const ILatticeFunction *>(fun)) {
diff --git a/Framework/DataHandling/src/FilterEventsByLogValuePreNexus.cpp b/Framework/DataHandling/src/FilterEventsByLogValuePreNexus.cpp
index b0842ee648f6c8830dd4fe3982c7e76fbf47c865..9af2254bf4c90b95fb99bd53e35719557fb8b058 100644
--- a/Framework/DataHandling/src/FilterEventsByLogValuePreNexus.cpp
+++ b/Framework/DataHandling/src/FilterEventsByLogValuePreNexus.cpp
@@ -201,8 +201,8 @@ static string generateMappingfileName(EventWorkspace_sptr &wksp) {
 /** Constructor
 */
 FilterEventsByLogValuePreNexus::FilterEventsByLogValuePreNexus()
-    : Mantid::API::IFileLoader<Kernel::FileDescriptor>(), m_prog(NULL),
-      m_protonChargeTot(0), m_detid_max(0), m_eventFile(NULL), m_numEvents(0),
+    : Mantid::API::IFileLoader<Kernel::FileDescriptor>(), m_prog(nullptr),
+      m_protonChargeTot(0), m_detid_max(0), m_eventFile(nullptr), m_numEvents(0),
       m_numPulses(0), m_numPixel(0), m_numGoodEvents(0), m_numErrorEvents(0),
       m_numBadEvents(0), m_numWrongdetidEvents(0), m_numIgnoredEvents(0),
       m_firstEvent(0), m_maxNumEvents(0), m_usingMappingFile(false),
diff --git a/Framework/DataHandling/src/FindDetectorsPar.cpp b/Framework/DataHandling/src/FindDetectorsPar.cpp
index 54a55db21733e1805eef52f48f2c924e01370b45..ff4a4a8850197d7ceb8b18e7cbcb72ebf574cd0d 100644
--- a/Framework/DataHandling/src/FindDetectorsPar.cpp
+++ b/Framework/DataHandling/src/FindDetectorsPar.cpp
@@ -67,7 +67,7 @@ void FindDetectorsPar::exec() {
 
   // Get the input workspace
   const MatrixWorkspace_sptr inputWS = this->getProperty("InputWorkspace");
-  if (inputWS.get() == NULL) {
+  if (inputWS.get() == nullptr) {
     throw(Kernel::Exception::NotFoundError(
         "can not obtain InoputWorkspace for the algorithm to work", ""));
   }
diff --git a/Framework/DataHandling/src/GroupDetectors2.cpp b/Framework/DataHandling/src/GroupDetectors2.cpp
index 5fb850d4c53f19a9188cc9364fc39fdcb88c2c68..aef71f842b331dc4b3698df1982fdb6c2c13924f 100644
--- a/Framework/DataHandling/src/GroupDetectors2.cpp
+++ b/Framework/DataHandling/src/GroupDetectors2.cpp
@@ -106,7 +106,7 @@ void GroupDetectors2::exec() {
   const bool preserveEvents = getProperty("PreserveEvents");
   EventWorkspace_const_sptr eventW =
       boost::dynamic_pointer_cast<const EventWorkspace>(inputWS);
-  if (eventW != NULL && preserveEvents) {
+  if (eventW != nullptr && preserveEvents) {
     this->execEvent();
     return;
   }
diff --git a/Framework/DataHandling/src/ISISRunLogs.cpp b/Framework/DataHandling/src/ISISRunLogs.cpp
index 5502c31b438857fe7263e889effb98a5935478e4..477b03bcc40a96e6e345028f20eb0f415b82ca50 100644
--- a/Framework/DataHandling/src/ISISRunLogs.cpp
+++ b/Framework/DataHandling/src/ISISRunLogs.cpp
@@ -35,7 +35,7 @@ ISISRunLogs::ISISRunLogs(const API::Run &icpRun, const int totalNumPeriods)
   }
   // If it does not exist then pass in a NULL log to indicate that period 1
   // should be assumed
-  m_logParser.reset(new LogParser(NULL));
+  m_logParser.reset(new LogParser(nullptr));
 }
 
 /**
@@ -53,8 +53,8 @@ void ISISRunLogs::addStatusLog(API::Run &exptRun) {
  */
 void ISISRunLogs::addPeriodLogs(const int period, API::Run &exptRun) {
   auto periodLog = m_logParser->createPeriodLog(period);
-  LogFilter *logFilter(NULL);
-  const TimeSeriesProperty<bool> *maskProp(NULL);
+  LogFilter *logFilter(nullptr);
+  const TimeSeriesProperty<bool> *maskProp(nullptr);
   try {
     auto runningLog =
         exptRun.getTimeSeriesProperty<bool>(LogParser::statusLogName());
diff --git a/Framework/DataHandling/src/LoadANSTOHelper.cpp b/Framework/DataHandling/src/LoadANSTOHelper.cpp
index 17d5c6f83bc20f1c59b77a4438e693e512e6d135..47f7b8ca9ba4e595fd4e9a68363a28de689e49a2 100644
--- a/Framework/DataHandling/src/LoadANSTOHelper.cpp
+++ b/Framework/DataHandling/src/LoadANSTOHelper.cpp
@@ -148,7 +148,7 @@ FastReadOnlyFile::FastReadOnlyFile(const char *filename) {
 }
 FastReadOnlyFile::~FastReadOnlyFile() {
   fclose(m_handle);
-  m_handle = NULL;
+  m_handle = nullptr;
 }
 void *FastReadOnlyFile::handle() const { return m_handle; }
 bool FastReadOnlyFile::read(void *buffer, uint32_t size) {
@@ -156,7 +156,7 @@ bool FastReadOnlyFile::read(void *buffer, uint32_t size) {
 }
 bool FastReadOnlyFile::seek(int64_t offset, int whence, int64_t *newPosition) {
   return (0 == fseek(m_handle, offset, whence)) &&
-         ((newPosition == NULL) ||
+         ((newPosition == nullptr) ||
           (0 <= (*newPosition = (int64_t)ftell(m_handle))));
 }
 #endif
@@ -179,7 +179,7 @@ File::File(const std::string &path)
     : m_good(true), m_file(path.c_str()), m_selected((size_t)-1), m_position(0),
       m_size(0), m_bufferPosition(0), m_bufferAvailable(0) {
 
-  m_good = m_file.handle() != NULL;
+  m_good = m_file.handle() != nullptr;
   while (m_good) {
     EntryHeader header;
     int64_t position;
diff --git a/Framework/DataHandling/src/LoadAscii2.cpp b/Framework/DataHandling/src/LoadAscii2.cpp
index 284ed879bc66f58b10ec66e8b574229c535161f0..9d4d109d4c01f3a3e499ab39930c64827e442450 100644
--- a/Framework/DataHandling/src/LoadAscii2.cpp
+++ b/Framework/DataHandling/src/LoadAscii2.cpp
@@ -28,7 +28,7 @@ using namespace API;
 LoadAscii2::LoadAscii2()
     : m_columnSep(), m_separatorIndex(), m_comment(), m_baseCols(0),
       m_specNo(0), m_lastBins(0), m_curBins(0), m_spectraStart(),
-      m_spectrumIDcount(0), m_lineNo(0), m_spectra(), m_curSpectra(NULL) {}
+      m_spectrumIDcount(0), m_lineNo(0), m_spectra(), m_curSpectra(nullptr) {}
 
 /**
 * Return the confidence with with this algorithm can load the file
diff --git a/Framework/DataHandling/src/LoadBBY.cpp b/Framework/DataHandling/src/LoadBBY.cpp
index fb62c22096f7b15ce6630d83314d722e200acdf1..f0812399d951d824348e01a31877541bb26c964d 100644
--- a/Framework/DataHandling/src/LoadBBY.cpp
+++ b/Framework/DataHandling/src/LoadBBY.cpp
@@ -247,7 +247,7 @@ void LoadBBY::exec() {
   // load events
   size_t numberHistograms = eventWS->getNumberHistograms();
 
-  std::vector<EventVector_pt> eventVectors(numberHistograms, NULL);
+  std::vector<EventVector_pt> eventVectors(numberHistograms, nullptr);
   std::vector<size_t> eventCounts(numberHistograms, 0);
 
   // phase correction
diff --git a/Framework/DataHandling/src/LoadDetectorsGroupingFile.cpp b/Framework/DataHandling/src/LoadDetectorsGroupingFile.cpp
index 083ce280b05e8b0535dc80ead758c3237a4e3a14..749f29fbba605ca27dcc495ea864dfd9019677a0 100644
--- a/Framework/DataHandling/src/LoadDetectorsGroupingFile.cpp
+++ b/Framework/DataHandling/src/LoadDetectorsGroupingFile.cpp
@@ -34,7 +34,7 @@ DECLARE_ALGORITHM(LoadDetectorsGroupingFile)
 /** Constructor
  */
 LoadDetectorsGroupingFile::LoadDetectorsGroupingFile()
-    : m_groupWS(), m_instrument(), m_pDoc(NULL), m_pRootElem(NULL),
+    : m_groupWS(), m_instrument(), m_pDoc(nullptr), m_pRootElem(nullptr),
       m_groupComponentsMap(), m_groupDetectorsMap(), m_groupSpectraMap() {}
 
 //----------------------------------------------------------------------------------------------
@@ -408,7 +408,7 @@ void LoadDetectorsGroupingFile::generateNoInstrumentGroupWorkspace() {
 LoadGroupXMLFile::LoadGroupXMLFile()
     : m_instrumentName(""), m_userGiveInstrument(false), m_date(""),
       m_userGiveDate(false), m_description(""), m_userGiveDescription(false),
-      m_pDoc(NULL), m_pRootElem(NULL), m_groupComponentsMap(),
+      m_pDoc(nullptr), m_pRootElem(nullptr), m_groupComponentsMap(),
       m_groupDetectorsMap(), m_groupSpectraMap(), m_startGroupID(1),
       m_groupNamesMap() {}
 
diff --git a/Framework/DataHandling/src/LoadEventNexus.cpp b/Framework/DataHandling/src/LoadEventNexus.cpp
index f20accc92a945015cabc63f15c511e5654cef437..d1f07ac1936b597446c2b90565cb9867ed05f983 100644
--- a/Framework/DataHandling/src/LoadEventNexus.cpp
+++ b/Framework/DataHandling/src/LoadEventNexus.cpp
@@ -111,7 +111,7 @@ BankPulseTimes::BankPulseTimes(::NeXus::File &file,
 *  Handles a zero-sized vector */
 BankPulseTimes::BankPulseTimes(const std::vector<Kernel::DateAndTime> &times) {
   numPulses = times.size();
-  pulseTimes = NULL;
+  pulseTimes = nullptr;
   if (numPulses == 0)
     return;
   pulseTimes = new DateAndTime[numPulses];
@@ -485,8 +485,8 @@ public:
         // m_loadError(false),
         prog(prog), scheduler(scheduler), m_loadError(false),
         m_oldNexusFileNames(oldNeXusFileNames), m_loadStart(), m_loadSize(),
-        m_event_id(NULL), m_event_time_of_flight(NULL), m_have_weight(false),
-        m_event_weight(NULL), m_framePeriodNumbers(framePeriodNumbers) {
+        m_event_id(nullptr), m_event_time_of_flight(nullptr), m_have_weight(false),
+        m_event_weight(nullptr), m_framePeriodNumbers(framePeriodNumbers) {
     setMutex(ioMutex);
     m_cost = static_cast<double>(numEvents);
     m_min_id = std::numeric_limits<uint32_t>::max();
@@ -802,9 +802,9 @@ public:
     m_loadSize.resize(1, 0);
 
     // Data arrays
-    m_event_id = NULL;
-    m_event_time_of_flight = NULL;
-    m_event_weight = NULL;
+    m_event_id = nullptr;
+    m_event_time_of_flight = nullptr;
+    m_event_weight = nullptr;
 
     m_loadError = false;
     m_have_weight = alg->m_haveWeights;
@@ -1020,7 +1020,7 @@ LoadEventNexus::LoadEventNexus()
       compressTolerance(0), eventVectors(), m_eventVectorMutex(),
       eventid_max(0), pixelID_to_wi_vector(), pixelID_to_wi_offset(),
       m_bankPulseTimes(), m_allBanksPulseTimes(), m_top_entry_name(),
-      m_file(NULL), splitProcessing(false), m_haveWeights(false),
+      m_file(nullptr), splitProcessing(false), m_haveWeights(false),
       weightedEventVectors(), m_instrument_loaded_correctly(false),
       loadlogs(false), m_logs_loaded_correctly(false), event_id_is_spec(false) {
 }
@@ -1394,7 +1394,7 @@ void LoadEventNexus::makeMapToEventLists(std::vector<std::vector<T>> &vectors) {
     // possible spectrum number
     eventid_max = maxSpecNo;
     for (size_t i = 0; i < vectors.size(); ++i) {
-      vectors[i].resize(maxSpecNo + 1, NULL);
+      vectors[i].resize(maxSpecNo + 1, nullptr);
     }
     for (size_t period = 0; period < m_ws->nPeriods(); ++period) {
       for (size_t i = 0; i < m_ws->getNumberHistograms(); ++i) {
@@ -1414,7 +1414,7 @@ void LoadEventNexus::makeMapToEventLists(std::vector<std::vector<T>> &vectors) {
     // Make an array where index = pixel ID
     // Set the value to NULL by default
     for (size_t i = 0; i < vectors.size(); ++i) {
-      vectors[i].resize(eventid_max + 1, NULL);
+      vectors[i].resize(eventid_max + 1, nullptr);
     }
 
     for (size_t j = size_t(pixelID_to_wi_offset);
@@ -1660,7 +1660,7 @@ void LoadEventNexus::loadEvents(API::Progress *const prog,
       nPeriods, periodLog); // This is how many workspaces we are going to make.
 
   // Make sure you have a non-NULL m_allBanksPulseTimes
-  if (m_allBanksPulseTimes == NULL) {
+  if (m_allBanksPulseTimes == nullptr) {
     std::vector<DateAndTime> temp;
     // m_allBanksPulseTimes = new BankPulseTimes(temp);
     m_allBanksPulseTimes = boost::make_shared<BankPulseTimes>(temp);
diff --git a/Framework/DataHandling/src/LoadEventPreNexus.cpp b/Framework/DataHandling/src/LoadEventPreNexus.cpp
index 7b70a3a3ab60d9dbe68ceeed407d8046b8ae979d..98753da0b9b6bf08e5925f5d26b2e959eab3dd42 100644
--- a/Framework/DataHandling/src/LoadEventPreNexus.cpp
+++ b/Framework/DataHandling/src/LoadEventPreNexus.cpp
@@ -77,10 +77,10 @@ static const double TOF_CONVERSION = .1;
 static const double CURRENT_CONVERSION = 1.e-6 / 3600.;
 
 LoadEventPreNexus::LoadEventPreNexus()
-    : Mantid::API::IFileLoader<Kernel::FileDescriptor>(), prog(NULL),
+    : Mantid::API::IFileLoader<Kernel::FileDescriptor>(), prog(nullptr),
       spectra_list(), pulsetimes(), event_indices(), proton_charge(),
       proton_charge_tot(0), pixel_to_wkspindex(), pixelmap(), detid_max(),
-      eventfile(NULL), num_events(0), num_pulses(0), numpixel(0),
+      eventfile(nullptr), num_events(0), num_pulses(0), numpixel(0),
       num_good_events(0), num_error_events(0), num_ignored_events(0),
       first_event(0), max_events(0), using_mapping_file(false),
       loadOnlySomeSpectra(false), spectraLoadMap(), longest_tof(0),
diff --git a/Framework/DataHandling/src/LoadEventPreNexus2.cpp b/Framework/DataHandling/src/LoadEventPreNexus2.cpp
index af47f471d31282197299d0a254d94c47ead7dcc1..4a9c0c3e9c99ae5f0747d7830fda6390b1d9d1b2 100644
--- a/Framework/DataHandling/src/LoadEventPreNexus2.cpp
+++ b/Framework/DataHandling/src/LoadEventPreNexus2.cpp
@@ -223,10 +223,10 @@ int LoadEventPreNexus2::confidence(Kernel::FileDescriptor &descriptor) const {
 /** Constructor
  */
 LoadEventPreNexus2::LoadEventPreNexus2()
-    : Mantid::API::IFileLoader<Kernel::FileDescriptor>(), prog(NULL),
+    : Mantid::API::IFileLoader<Kernel::FileDescriptor>(), prog(nullptr),
       spectra_list(), pulsetimes(), event_indices(), proton_charge(),
       proton_charge_tot(0), pixel_to_wkspindex(), pixelmap(), detid_max(),
-      eventfile(NULL), num_events(0), num_pulses(0), numpixel(0),
+      eventfile(nullptr), num_events(0), num_pulses(0), numpixel(0),
       num_good_events(0), num_error_events(0), num_bad_events(0),
       num_wrongdetid_events(0), num_ignored_events(0), first_event(0),
       max_events(0), using_mapping_file(false), loadOnlySomeSpectra(false),
diff --git a/Framework/DataHandling/src/LoadGSS.cpp b/Framework/DataHandling/src/LoadGSS.cpp
index d9b527d4be470c1859212596b41139da56a024f0..72155de785812032c0424cce46ebe71d87363ce7 100644
--- a/Framework/DataHandling/src/LoadGSS.cpp
+++ b/Framework/DataHandling/src/LoadGSS.cpp
@@ -107,7 +107,7 @@ API::MatrixWorkspace_sptr LoadGSS::loadGSASFile(const std::string &filename,
   std::vector<double> vecX, vecY, vecE;
 
   // progress
-  Progress *prog = NULL;
+  Progress *prog = nullptr;
 
   // Parameters for reading file
   char currentLine[256];
@@ -145,7 +145,7 @@ API::MatrixWorkspace_sptr LoadGSS::loadGSASFile(const std::string &filename,
 
   while (!input.eof() && input.getline(currentLine, 256)) {
     // Initialize progress after NSpec is imported
-    if (nSpec != 0 && prog == NULL) {
+    if (nSpec != 0 && prog == nullptr) {
       prog = new Progress(this, 0.0, 1.0, nSpec);
     }
 
@@ -232,7 +232,7 @@ API::MatrixWorkspace_sptr LoadGSS::loadGSASFile(const std::string &filename,
         vecY.clear();
         vecE.clear();
 
-        if (prog != NULL)
+        if (prog != nullptr)
           prog->report();
       }
 
diff --git a/Framework/DataHandling/src/LoadHelper.cpp b/Framework/DataHandling/src/LoadHelper.cpp
index 0e7ccc4553e53bf48d92d792049ea8578dca23e3..9384d4eae2e7d3a8c4a98a5b1e74dbdc34da4d19 100644
--- a/Framework/DataHandling/src/LoadHelper.cpp
+++ b/Framework/DataHandling/src/LoadHelper.cpp
@@ -378,7 +378,7 @@ void LoadHelper::recurseAndAddNexusFieldsToWsRun(NXhandle nxfileID,
           } // test on nxdata type
 
           NXfree(&dataBuffer);
-          dataBuffer = NULL;
+          dataBuffer = nullptr;
 
         } // if (parent_class == "NXData" || parent_class == "NXMonitor") else
 
diff --git a/Framework/DataHandling/src/LoadILL.cpp b/Framework/DataHandling/src/LoadILL.cpp
index 93fc3cba522a34e3636ccdd640189debc34f8872..4b3223fa384b080eba41d6b0a9cdc8e58e1f8538 100644
--- a/Framework/DataHandling/src/LoadILL.cpp
+++ b/Framework/DataHandling/src/LoadILL.cpp
@@ -171,7 +171,7 @@ int LoadILL::getEPPFromVanadium(const std::string &filenameVanadium,
                                 MatrixWorkspace_sptr vanaWS) {
   int calculatedDetectorElasticPeakPosition = -1;
 
-  if (vanaWS != NULL) {
+  if (vanaWS != nullptr) {
 
     // Check if it has been store on the run object for this workspace
     if (vanaWS->run().hasProperty("EPP")) {
diff --git a/Framework/DataHandling/src/LoadISISNexus2.cpp b/Framework/DataHandling/src/LoadISISNexus2.cpp
index c93baf6a8f675052b89eb8142aa699afab82f704..ff238d1af842cf6b8da389ec7a4e254375e1a0c8 100644
--- a/Framework/DataHandling/src/LoadISISNexus2.cpp
+++ b/Framework/DataHandling/src/LoadISISNexus2.cpp
@@ -52,7 +52,7 @@ LoadISISNexus2::LoadISISNexus2()
       m_monBlockInfo(), m_loadBlockInfo(), m_have_detector(false),
       m_load_selected_spectra(false), m_specInd2specNum_map(), m_spec2det_map(),
       m_entrynumber(0), m_tof_data(), m_proton_charge(0.), m_spec(),
-      m_spec_end(NULL), m_monitors(), m_logCreator(), m_progress(),
+      m_spec_end(nullptr), m_monitors(), m_logCreator(), m_progress(),
       m_cppFile() {}
 
 /**
diff --git a/Framework/DataHandling/src/LoadInstrumentFromRaw.cpp b/Framework/DataHandling/src/LoadInstrumentFromRaw.cpp
index a51c6696c8caeb47eba7b28519053ef95dc95eda..38c9985e9c3fc31758a3fc918147043e33b6be15 100644
--- a/Framework/DataHandling/src/LoadInstrumentFromRaw.cpp
+++ b/Framework/DataHandling/src/LoadInstrumentFromRaw.cpp
@@ -55,7 +55,7 @@ void LoadInstrumentFromRaw::exec() {
   const MatrixWorkspace_sptr localWorkspace = getProperty("Workspace");
 
   // open raw file
-  ISISRAW iraw(NULL);
+  ISISRAW iraw(nullptr);
   if (iraw.readFromFile(m_filename.c_str(), false) != 0) {
     g_log.error("Unable to open file " + m_filename);
     throw Exception::FileError("Unable to open File:", m_filename);
diff --git a/Framework/DataHandling/src/LoadIsawDetCal.cpp b/Framework/DataHandling/src/LoadIsawDetCal.cpp
index 6d1fe37a67a70572d7cb78bb63e6072e11d1530d..1fdb0066681e9b518bc22a7568643699e3917f36 100644
--- a/Framework/DataHandling/src/LoadIsawDetCal.cpp
+++ b/Framework/DataHandling/src/LoadIsawDetCal.cpp
@@ -412,7 +412,7 @@ void LoadIsawDetCal::center(double x, double y, double z, std::string detname,
   Instrument_sptr inst = getCheckInst(ws);
 
   IComponent_const_sptr comp = inst->getComponentByName(detname);
-  if (comp == 0) {
+  if (comp == nullptr) {
     std::ostringstream mess;
     mess << "Component with name " << detname << " was not found.";
     g_log.error(mess.str());
diff --git a/Framework/DataHandling/src/LoadLog.cpp b/Framework/DataHandling/src/LoadLog.cpp
index dceaa8cbe11dc50d79cb64f4cc628bb7482229cf..aa1f1a2a58235dc14cd9bd354265f3270b5e440d 100644
--- a/Framework/DataHandling/src/LoadLog.cpp
+++ b/Framework/DataHandling/src/LoadLog.cpp
@@ -195,8 +195,8 @@ void LoadLog::loadThreeColumnLogFile(std::ifstream &logFileStream,
                                      std::string logFileName, API::Run &run) {
   std::string str;
   std::string propname;
-  Mantid::Kernel::TimeSeriesProperty<double> *logd = 0;
-  Mantid::Kernel::TimeSeriesProperty<std::string> *logs = 0;
+  Mantid::Kernel::TimeSeriesProperty<double> *logd = nullptr;
+  Mantid::Kernel::TimeSeriesProperty<std::string> *logs = nullptr;
   std::map<std::string, Kernel::TimeSeriesProperty<double> *> dMap;
   std::map<std::string, Kernel::TimeSeriesProperty<std::string> *> sMap;
   typedef std::pair<std::string, Kernel::TimeSeriesProperty<double> *> dpair;
diff --git a/Framework/DataHandling/src/LoadLogsForSNSPulsedMagnet.cpp b/Framework/DataHandling/src/LoadLogsForSNSPulsedMagnet.cpp
index 34df470e1b81288c0ef957c8777951939dec3dcc..fdf3e3c2aa7b6f1910752bfbd59d0c6142dce3a8 100644
--- a/Framework/DataHandling/src/LoadLogsForSNSPulsedMagnet.cpp
+++ b/Framework/DataHandling/src/LoadLogsForSNSPulsedMagnet.cpp
@@ -26,7 +26,7 @@ using namespace Mantid::API;
 LoadLogsForSNSPulsedMagnet::LoadLogsForSNSPulsedMagnet()
     : m_delaytimefilename(""), m_pulseidfilename(""),
       m_delayfileinoldformat(false), m_numpulses(0), m_numchoppers(0),
-      m_delaytimes(NULL), m_pulseidseconds(), m_pulseidnanoseconds(), WS() {}
+      m_delaytimes(nullptr), m_pulseidseconds(), m_pulseidnanoseconds(), WS() {}
 
 //----------------------------------------------------------------------------------------------
 /** Destructor
diff --git a/Framework/DataHandling/src/LoadMask.cpp b/Framework/DataHandling/src/LoadMask.cpp
index 60b3f96cbe075d53b2e1f2b250b05593da6f5c51..2f1cb21d26b9941c7238646984305cefd06fed1e 100644
--- a/Framework/DataHandling/src/LoadMask.cpp
+++ b/Framework/DataHandling/src/LoadMask.cpp
@@ -45,7 +45,7 @@ DECLARE_ALGORITHM(LoadMask)
 /** Constructor
  */
 LoadMask::LoadMask()
-    : m_maskWS(), m_instrumentPropValue(""), m_pDoc(NULL), m_pRootElem(NULL),
+    : m_maskWS(), m_instrumentPropValue(""), m_pDoc(nullptr), m_pRootElem(nullptr),
       m_defaultToUse(true) {}
 
 //----------------------------------------------------------------------------------------------
@@ -60,8 +60,8 @@ LoadMask::~LoadMask() {
   // actually cause a double free corruption, as
   // Poco::DOM::Document::documentElement() does not require a
   // release(). So just to be explicit that they're gone:
-  m_pDoc = NULL;
-  m_pRootElem = NULL;
+  m_pDoc = nullptr;
+  m_pRootElem = nullptr;
 }
 
 /// Initialise the properties
diff --git a/Framework/DataHandling/src/LoadMcStas.cpp b/Framework/DataHandling/src/LoadMcStas.cpp
index 3b16dd7d06682b44ea1f37644ac022b39aa0cef7..233a47ce3001214852405fa5a6abbcae7245327a 100644
--- a/Framework/DataHandling/src/LoadMcStas.cpp
+++ b/Framework/DataHandling/src/LoadMcStas.cpp
@@ -203,7 +203,7 @@ void LoadMcStas::readEventData(
           InstrumentDataService::Instance().retrieve(instrumentNameMangled);
     } else {
       // Really create the instrument
-      instrument = parser.parseXML(NULL);
+      instrument = parser.parseXML(nullptr);
       // Add to data service for later retrieval
       InstrumentDataService::Instance().add(instrumentNameMangled, instrument);
     }
diff --git a/Framework/DataHandling/src/LoadMuonNexus2.cpp b/Framework/DataHandling/src/LoadMuonNexus2.cpp
index abf0bd22c28179a046332498b055ac894a6c9816..f484cf090e4453c0c6f7d8681cc29827877fc3da 100644
--- a/Framework/DataHandling/src/LoadMuonNexus2.cpp
+++ b/Framework/DataHandling/src/LoadMuonNexus2.cpp
@@ -297,7 +297,7 @@ void LoadMuonNexus2::loadData(const Mantid::NeXus::NXInt &counts,
   X.assign(timeBins.begin(), timeBins.end());
 
   int nBins = 0;
-  int *data = NULL;
+  int *data = nullptr;
 
   if (counts.rank() == 3) {
     nBins = counts.dim2();
diff --git a/Framework/DataHandling/src/LoadNexusLogs.cpp b/Framework/DataHandling/src/LoadNexusLogs.cpp
index 6df5f9622fe7dbb141d55beefdb67a1b3466fb50..0c2f5b5db19333cc15f79c18cc969bea132a5cb1 100644
--- a/Framework/DataHandling/src/LoadNexusLogs.cpp
+++ b/Framework/DataHandling/src/LoadNexusLogs.cpp
@@ -431,7 +431,7 @@ void LoadNexusLogs::loadSELog(
   //   value_log - A time series entry. This can contain a corrupt value entry
   //   so if it does use the value one
   //   value - A single value float entry
-  Kernel::Property *logValue(NULL);
+  Kernel::Property *logValue(nullptr);
   std::map<std::string, std::string> entries = file.getEntries();
   if (entries.find("value_log") != entries.end()) {
     try {
diff --git a/Framework/DataHandling/src/LoadNexusMonitors2.cpp b/Framework/DataHandling/src/LoadNexusMonitors2.cpp
index 8b835b0ad98a9e9d0fc24510f7bc4e8f06b713cf..1ec8bf099b457c763fabd5a15d891e04b95b45f6 100644
--- a/Framework/DataHandling/src/LoadNexusMonitors2.cpp
+++ b/Framework/DataHandling/src/LoadNexusMonitors2.cpp
@@ -581,7 +581,7 @@ void LoadNexusMonitors2::runLoadLogs(const std::string filename,
  **/
 bool LoadNexusMonitors2::canOpenAsNeXus(const std::string &fname) {
   bool res = true;
-  ::NeXus::File *f = NULL;
+  ::NeXus::File *f = nullptr;
   try {
     f = new ::NeXus::File(fname);
     if (f)
diff --git a/Framework/DataHandling/src/LoadNexusProcessed.cpp b/Framework/DataHandling/src/LoadNexusProcessed.cpp
index d468ab64ca85a53b37dd1e90b9edc843c863bbbc..a1cd54d73ea3097d038859b03cd5369253e73295 100644
--- a/Framework/DataHandling/src/LoadNexusProcessed.cpp
+++ b/Framework/DataHandling/src/LoadNexusProcessed.cpp
@@ -193,7 +193,7 @@ bool isMultiPeriodFile(int nWorkspaceEntries, Workspace_sptr sampleWS,
 LoadNexusProcessed::LoadNexusProcessed()
     : m_shared_bins(false), m_xbins(), m_axis1vals(), m_list(false),
       m_interval(false), m_spec_min(0), m_spec_max(Mantid::EMPTY_INT()),
-      m_spec_list(), m_filtered_spec_idxs(), m_cppFile(NULL) {}
+      m_spec_list(), m_filtered_spec_idxs(), m_cppFile(nullptr) {}
 
 /// Delete NexusFileIO in destructor
 LoadNexusProcessed::~LoadNexusProcessed() { delete m_cppFile; }
@@ -1844,11 +1844,11 @@ void LoadNexusProcessed::loadBlock(NXDataSetTyped<double> &data,
   double *data_end = data_start + nchannels;
   double *err_start = errors();
   double *err_end = err_start + nchannels;
-  double *farea_start = NULL;
-  double *farea_end = NULL;
+  double *farea_start = nullptr;
+  double *farea_end = nullptr;
   const int64_t nxbins(m_xbins->size());
-  double *xErrors_start = NULL;
-  double *xErrors_end = NULL;
+  double *xErrors_start = nullptr;
+  double *xErrors_end = nullptr;
   RebinnedOutput_sptr rb_workspace;
   if (hasFArea) {
     farea.load(static_cast<int>(blocksize), static_cast<int>(hist));
@@ -1921,11 +1921,11 @@ void LoadNexusProcessed::loadBlock(NXDataSetTyped<double> &data,
   double *data_end = data_start + nchannels;
   double *err_start = errors();
   double *err_end = err_start + nchannels;
-  double *farea_start = NULL;
-  double *farea_end = NULL;
+  double *farea_start = nullptr;
+  double *farea_end = nullptr;
   const int64_t nxbins(m_xbins->size());
-  double *xErrors_start = NULL;
-  double *xErrors_end = NULL;
+  double *xErrors_start = nullptr;
+  double *xErrors_end = nullptr;
   RebinnedOutput_sptr rb_workspace;
   if (hasFArea) {
     farea.load(static_cast<int>(blocksize), static_cast<int>(hist));
@@ -1999,10 +1999,10 @@ void LoadNexusProcessed::loadBlock(NXDataSetTyped<double> &data,
   errors.load(static_cast<int>(blocksize), static_cast<int>(hist));
   double *err_start = errors();
   double *err_end = err_start + nchannels;
-  double *farea_start = NULL;
-  double *farea_end = NULL;
-  double *xErrors_start = NULL;
-  double *xErrors_end = NULL;
+  double *farea_start = nullptr;
+  double *farea_end = nullptr;
+  double *xErrors_start = nullptr;
+  double *xErrors_end = nullptr;
   RebinnedOutput_sptr rb_workspace;
   if (hasFArea) {
     farea.load(static_cast<int>(blocksize), static_cast<int>(hist));
diff --git a/Framework/DataHandling/src/LoadRaw/isisraw.cpp b/Framework/DataHandling/src/LoadRaw/isisraw.cpp
index b46931a54497d2a9a001392992f3836dad9d6bd2..ac3a73ec1f4da4ee2097ecb3b9903543777a9404 100644
--- a/Framework/DataHandling/src/LoadRaw/isisraw.cpp
+++ b/Framework/DataHandling/src/LoadRaw/isisraw.cpp
@@ -8,7 +8,7 @@
 #define FAILURE 1
 
 /// stuff
-ISISRAW::ISISRAW() : m_crpt(0), dat1(0) {
+ISISRAW::ISISRAW() : m_crpt(nullptr), dat1(nullptr) {
   int i, j;
   // section 1
   frmt_ver_no = 2; // format version number VER1 (=2)
@@ -135,11 +135,11 @@ int ISISRAW::addItems() {
 /// stuff
 ISISRAW::ISISRAW(ISISCRPT_STRUCT *crpt)
     : m_crpt(crpt), frmt_ver_no(0), data_format(0), ver2(0), r_number(0),
-      ver3(0), i_det(0), i_mon(0), i_use(0), mdet(0), monp(0), spec(0), delt(0),
-      len2(0), code(0), tthe(0), ut(0), ver4(0), ver5(0), crat(0), modn(0),
-      mpos(0), timr(0), udet(0), ver6(0), t_ntrg(0), t_nfpp(0), t_nper(0),
-      t_nsp1(0), t_ntc1(0), t_pre1(0), t_tcb1(0), ver7(0), u_dat(0), ver8(0),
-      ddes(0), dat1(0) {
+      ver3(0), i_det(0), i_mon(0), i_use(0), mdet(nullptr), monp(nullptr), spec(nullptr), delt(nullptr),
+      len2(nullptr), code(nullptr), tthe(nullptr), ut(nullptr), ver4(0), ver5(0), crat(nullptr), modn(nullptr),
+      mpos(nullptr), timr(nullptr), udet(nullptr), ver6(0), t_ntrg(0), t_nfpp(0), t_nper(0),
+      t_nsp1(0), t_ntc1(0), t_pre1(0), t_tcb1(nullptr), ver7(0), u_dat(nullptr), ver8(0),
+      ddes(nullptr), dat1(nullptr) {
   memset(r_title, ' ', sizeof(r_title));
   memset(i_inst, ' ', sizeof(i_inst));
   for (int i = 0; i < 256; i++) {
@@ -148,10 +148,10 @@ ISISRAW::ISISRAW(ISISCRPT_STRUCT *crpt)
   memset(t_tcm1, 0, sizeof(t_tcm1)); // time channel mode
   memset(t_tcp1, 0, sizeof(t_tcp1)); // time channel parameters
   e_nse = 0;
-  e_seblock = 0;
+  e_seblock = nullptr;
   u_len = 0;
   logsect.nlines = 0;
-  logsect.lines = 0;
+  logsect.lines = nullptr;
   addItems();
   updateFromCRPT();
 }
@@ -160,11 +160,11 @@ ISISRAW::ISISRAW(ISISCRPT_STRUCT *crpt)
 /// stuff
 ISISRAW::ISISRAW(ISISCRPT_STRUCT *crpt, bool doUpdateFromCRPT)
     : m_crpt(crpt), frmt_ver_no(0), data_format(0), ver2(0), r_number(0),
-      ver3(0), i_det(0), i_mon(0), i_use(0), mdet(0), monp(0), spec(0), delt(0),
-      len2(0), code(0), tthe(0), ut(0), ver4(0), ver5(0), crat(0), modn(0),
-      mpos(0), timr(0), udet(0), ver6(0), t_ntrg(0), t_nfpp(0), t_nper(0),
-      t_nsp1(0), t_ntc1(0), t_pre1(0), t_tcb1(0), ver7(0), u_dat(0), ver8(0),
-      ddes(0), dat1(0) {
+      ver3(0), i_det(0), i_mon(0), i_use(0), mdet(nullptr), monp(nullptr), spec(nullptr), delt(nullptr),
+      len2(nullptr), code(nullptr), tthe(nullptr), ut(nullptr), ver4(0), ver5(0), crat(nullptr), modn(nullptr),
+      mpos(nullptr), timr(nullptr), udet(nullptr), ver6(0), t_ntrg(0), t_nfpp(0), t_nper(0),
+      t_nsp1(0), t_ntc1(0), t_pre1(0), t_tcb1(nullptr), ver7(0), u_dat(nullptr), ver8(0),
+      ddes(nullptr), dat1(nullptr) {
   memset(r_title, ' ', sizeof(r_title));
   memset(i_inst, ' ', sizeof(i_inst));
   for (int i = 0; i < 256; i++) {
@@ -173,10 +173,10 @@ ISISRAW::ISISRAW(ISISCRPT_STRUCT *crpt, bool doUpdateFromCRPT)
   memset(t_tcm1, 0, sizeof(t_tcm1)); // time channel mode
   memset(t_tcp1, 0, sizeof(t_tcp1)); // time channel parameters
   e_nse = 0;
-  e_seblock = 0;
+  e_seblock = nullptr;
   u_len = 0;
   logsect.nlines = 0;
-  logsect.lines = 0;
+  logsect.lines = nullptr;
   addItems();
   if (doUpdateFromCRPT) {
     updateFromCRPT();
@@ -186,7 +186,7 @@ ISISRAW::ISISRAW(ISISCRPT_STRUCT *crpt, bool doUpdateFromCRPT)
 // update from bound CRPT
 /// stuff
 int ISISRAW::updateFromCRPT() {
-  if (m_crpt == NULL) {
+  if (m_crpt == nullptr) {
     return 0;
   }
 #ifndef REAL_CRPT
@@ -479,7 +479,7 @@ int ISISRAW::ioRAW(FILE *file, bool from_file, bool read_data) {
   auto outbuff = new char[outbuff_size];
   if (!read_data) {
     ndes = ndata = 0;
-    dat1 = NULL;
+    dat1 = nullptr;
     // seek to position right after the data if we want to read the log
     if (from_file) {
       ndes = t_nper * (t_nsp1 + 1);
@@ -706,7 +706,7 @@ int ISISRAW::ioRAW(FILE *file, LOG_LINE *s, int len, bool from_file) {
 
 /// stuff
 int ISISRAW::ioRAW(FILE *file, char *s, int len, bool from_file) {
-  if ((len <= 0) || (s == 0)) {
+  if ((len <= 0) || (s == nullptr)) {
     return 0;
   }
 
@@ -723,7 +723,7 @@ int ISISRAW::ioRAW(FILE *file, char *s, int len, bool from_file) {
 
 /// stuff
 int ISISRAW::ioRAW(FILE *file, int *s, int len, bool from_file) {
-  if ((len <= 0) || (s == 0)) {
+  if ((len <= 0) || (s == nullptr)) {
     return 0;
   }
 
@@ -740,7 +740,7 @@ int ISISRAW::ioRAW(FILE *file, int *s, int len, bool from_file) {
 
 /// stuff
 int ISISRAW::ioRAW(FILE *file, uint32_t *s, int len, bool from_file) {
-  if ((len <= 0) || (s == 0)) {
+  if ((len <= 0) || (s == nullptr)) {
     return 0;
   }
 
@@ -757,7 +757,7 @@ int ISISRAW::ioRAW(FILE *file, uint32_t *s, int len, bool from_file) {
 /// stuff
 int ISISRAW::ioRAW(FILE *file, float *s, int len, bool from_file) {
   int errcode = 0;
-  if ((len <= 0) || (s == 0)) {
+  if ((len <= 0) || (s == nullptr)) {
     return 0;
   }
 
@@ -781,10 +781,10 @@ int ISISRAW::ioRAW(FILE *file, char **s, int len, bool from_file) {
       *s = new char[len];
       ioRAW(file, *s, len, from_file);
     } else {
-      *s = 0;
+      *s = nullptr;
     }
   } else {
-    if (*s != 0) {
+    if (*s != nullptr) {
       ioRAW(file, *s, len, from_file);
     }
   }
@@ -798,10 +798,10 @@ int ISISRAW::ioRAW(FILE *file, int **s, int len, bool from_file) {
       *s = new int[len];
       ioRAW(file, *s, len, from_file);
     } else {
-      *s = 0;
+      *s = nullptr;
     }
   } else {
-    if (*s != 0) {
+    if (*s != nullptr) {
       ioRAW(file, *s, len, from_file);
     }
   }
@@ -815,10 +815,10 @@ int ISISRAW::ioRAW(FILE *file, uint32_t **s, int len, bool from_file) {
       *s = new uint32_t[len];
       ioRAW(file, *s, len, from_file);
     } else {
-      *s = 0;
+      *s = nullptr;
     }
   } else {
-    if (*s != 0) {
+    if (*s != nullptr) {
       ioRAW(file, *s, len, from_file);
     }
   }
@@ -832,10 +832,10 @@ int ISISRAW::ioRAW(FILE *file, float **s, int len, bool from_file) {
       *s = new float[len];
       ioRAW(file, *s, len, from_file);
     } else {
-      *s = 0;
+      *s = nullptr;
     }
   } else {
-    if (*s != 0) {
+    if (*s != nullptr) {
       ioRAW(file, *s, len, from_file);
     }
   }
@@ -849,10 +849,10 @@ int ISISRAW::ioRAW(FILE *file, SE_STRUCT **s, int len, bool from_file) {
       *s = new SE_STRUCT[len];
       ioRAW(file, *s, len, from_file);
     } else {
-      *s = 0;
+      *s = nullptr;
     }
   } else {
-    if (*s != 0) {
+    if (*s != nullptr) {
       ioRAW(file, *s, len, from_file);
     }
   }
@@ -866,10 +866,10 @@ int ISISRAW::ioRAW(FILE *file, DDES_STRUCT **s, int len, bool from_file) {
       *s = new DDES_STRUCT[len];
       ioRAW(file, *s, len, from_file);
     } else {
-      *s = 0;
+      *s = nullptr;
     }
   } else {
-    if (*s != 0) {
+    if (*s != nullptr) {
       ioRAW(file, *s, len, from_file);
     }
   }
@@ -883,10 +883,10 @@ int ISISRAW::ioRAW(FILE *file, LOG_LINE **s, int len, bool from_file) {
       *s = new LOG_LINE[len];
       ioRAW(file, *s, len, from_file);
     } else {
-      *s = 0;
+      *s = nullptr;
     }
   } else {
-    if (*s != 0) {
+    if (*s != nullptr) {
       ioRAW(file, *s, len, from_file);
     }
   }
@@ -914,7 +914,7 @@ int ISISRAW::vmstime(char *timbuf, int len, time_t time_value) {
    * get time in VMS format 01-JAN-1970 00:00:00
    */
   size_t i, n;
-  struct tm *tmstruct = NULL;
+  struct tm *tmstruct = nullptr;
 #ifdef MS_VISUAL_STUDIO
   errno_t err = localtime_s(tmstruct, &time_value);
   if (err) {
@@ -940,7 +940,7 @@ int ISISRAW::readFromFile(const char *filename, bool read_data) {
 #else  //_WIN32
   FILE *input_file = fopen(filename, "rb");
 #endif //_WIN32
-  if (input_file != NULL) {
+  if (input_file != nullptr) {
     ioRAW(input_file, true, read_data);
     fclose(input_file);
     return 0;
diff --git a/Framework/DataHandling/src/LoadRaw/isisraw2.cpp b/Framework/DataHandling/src/LoadRaw/isisraw2.cpp
index 331b26bb1f8bb3a6758834da87dc064b47ac0d5a..319e354692c05040eb80f71970aaa80406d461ea 100644
--- a/Framework/DataHandling/src/LoadRaw/isisraw2.cpp
+++ b/Framework/DataHandling/src/LoadRaw/isisraw2.cpp
@@ -15,7 +15,7 @@ Mantid::Kernel::Logger g_log("ISISRAW2");
 
 /// No arg Constructor
 ISISRAW2::ISISRAW2()
-    : ISISRAW(NULL, false), ndes(0), outbuff(0), m_bufferSize(0) {
+    : ISISRAW(nullptr, false), ndes(0), outbuff(nullptr), m_bufferSize(0) {
   // Determine the size of the output buffer to create from the config service.
   g_log.debug() << "Determining ioRaw buffer size\n";
   if (Mantid::Kernel::ConfigService::Instance().getValue(
diff --git a/Framework/DataHandling/src/LoadRawHelper.cpp b/Framework/DataHandling/src/LoadRawHelper.cpp
index 398eee8c2c7a98d77d346862c5c4438e8ac03d45..5be2e5d90a48e9135423bd5c8ce7fab91653f62e 100644
--- a/Framework/DataHandling/src/LoadRawHelper.cpp
+++ b/Framework/DataHandling/src/LoadRawHelper.cpp
@@ -87,7 +87,7 @@ void LoadRawHelper::init() {
  */
 FILE *LoadRawHelper::openRawFile(const std::string &fileName) {
   FILE *file = fopen(fileName.c_str(), "rb");
-  if (file == NULL) {
+  if (file == nullptr) {
     g_log.error("Unable to open file " + fileName);
     throw Exception::FileError("Unable to open File:", fileName);
   }
@@ -762,7 +762,7 @@ void LoadRawHelper::createPeriodLogs(
  */
 void LoadRawHelper::loadRunParameters(API::MatrixWorkspace_sptr localWorkspace,
                                       ISISRAW *const rawFile) const {
-  ISISRAW *localISISRaw(NULL);
+  ISISRAW *localISISRaw(nullptr);
   if (!rawFile) {
     localISISRaw = isisRaw.get();
   } else {
diff --git a/Framework/DataHandling/src/LoadSampleDetailsFromRaw.cpp b/Framework/DataHandling/src/LoadSampleDetailsFromRaw.cpp
index 6becc35c3dfcba5312e9044eacb536a0b6f917ed..768a6e9b7c737017057952d3c1aac0d4e320f98d 100644
--- a/Framework/DataHandling/src/LoadSampleDetailsFromRaw.cpp
+++ b/Framework/DataHandling/src/LoadSampleDetailsFromRaw.cpp
@@ -40,7 +40,7 @@ void LoadSampleDetailsFromRaw::exec() {
 
   std::string filename = getPropertyValue("Filename");
   FILE *file = fopen(filename.c_str(), "rb");
-  if (file == NULL) {
+  if (file == nullptr) {
     g_log.error("Unable to open file " + filename);
     throw Exception::FileError("Unable to open File:", filename);
   }
diff --git a/Framework/DataHandling/src/MoveInstrumentComponent.cpp b/Framework/DataHandling/src/MoveInstrumentComponent.cpp
index 4ae8f75ac54aae082ffd5cc188678d00c20855e2..2cc06e7c88ee6e71b38d178927ea20a7b7286936 100644
--- a/Framework/DataHandling/src/MoveInstrumentComponent.cpp
+++ b/Framework/DataHandling/src/MoveInstrumentComponent.cpp
@@ -68,7 +68,7 @@ void MoveInstrumentComponent::exec() {
   // Find the component to move
   if (DetID != -1) {
     comp = inst->getDetector(DetID);
-    if (comp == 0) {
+    if (comp == nullptr) {
       std::ostringstream mess;
       mess << "Detector with ID " << DetID << " was not found.";
       g_log.error(mess.str());
@@ -76,7 +76,7 @@ void MoveInstrumentComponent::exec() {
     }
   } else if (!ComponentName.empty()) {
     comp = inst->getComponentByName(ComponentName);
-    if (comp == 0) {
+    if (comp == nullptr) {
       std::ostringstream mess;
       mess << "Component with name " << ComponentName << " was not found.";
       g_log.error(mess.str());
diff --git a/Framework/DataHandling/src/ProcessDasNexusLog.cpp b/Framework/DataHandling/src/ProcessDasNexusLog.cpp
index bf766508f080eb2b4c2e0b7f1ef8da494df410d7..13d55cb17add7b867798989b7cd0c425594d8ba2 100644
--- a/Framework/DataHandling/src/ProcessDasNexusLog.cpp
+++ b/Framework/DataHandling/src/ProcessDasNexusLog.cpp
@@ -63,7 +63,7 @@ void ProcessDasNexusLog::exec() {
 
   // 2. Check Input
   // 1. Get log
-  Kernel::Property *log(NULL);
+  Kernel::Property *log(nullptr);
   try {
     log = inWS->run().getProperty(inlogname);
   } catch (Exception::NotFoundError &) {
diff --git a/Framework/DataHandling/src/RotateInstrumentComponent.cpp b/Framework/DataHandling/src/RotateInstrumentComponent.cpp
index adf61ef3c061e495d3f8ea629a531897fccae69a..53dd25c73db92a935276cd16ef30a50f7f5ee3f5 100644
--- a/Framework/DataHandling/src/RotateInstrumentComponent.cpp
+++ b/Framework/DataHandling/src/RotateInstrumentComponent.cpp
@@ -93,7 +93,7 @@ void RotateInstrumentComponent::exec() {
   // Find the component to move
   if (DetID != -1) {
     comp = inst->getDetector(DetID);
-    if (comp == 0) {
+    if (comp == nullptr) {
       std::ostringstream mess;
       mess << "Detector with ID " << DetID << " was not found.";
       g_log.error(mess.str());
@@ -101,7 +101,7 @@ void RotateInstrumentComponent::exec() {
     }
   } else if (!ComponentName.empty()) {
     comp = inst->getComponentByName(ComponentName);
-    if (comp == 0) {
+    if (comp == nullptr) {
       std::ostringstream mess;
       mess << "Component with name " << ComponentName << " was not found.";
       g_log.error(mess.str());
diff --git a/Framework/DataHandling/src/SaveFocusedXYE.cpp b/Framework/DataHandling/src/SaveFocusedXYE.cpp
index f6b917b15e21d2aaf92d1af68e3434b3aeae611a..d8e40b30886ffad12df45ceb480664a3875ce81c 100644
--- a/Framework/DataHandling/src/SaveFocusedXYE.cpp
+++ b/Framework/DataHandling/src/SaveFocusedXYE.cpp
@@ -308,7 +308,7 @@ void SaveFocusedXYE::getFocusedPos(Mantid::API::MatrixWorkspace_const_sptr wksp,
                                    const size_t spectrum, double &l1,
                                    double &l2, double &tth) {
   Geometry::Instrument_const_sptr instrument = wksp->getInstrument();
-  if (instrument == NULL) {
+  if (instrument == nullptr) {
     l1 = 0.;
     l2 = 0.;
     tth = 0.;
@@ -316,7 +316,7 @@ void SaveFocusedXYE::getFocusedPos(Mantid::API::MatrixWorkspace_const_sptr wksp,
   }
   Geometry::IComponent_const_sptr source = instrument->getSource();
   Geometry::IComponent_const_sptr sample = instrument->getSample();
-  if (source == NULL || sample == NULL) {
+  if (source == nullptr || sample == nullptr) {
     l1 = 0.;
     l2 = 0.;
     tth = 0.;
diff --git a/Framework/DataHandling/src/SaveGSS.cpp b/Framework/DataHandling/src/SaveGSS.cpp
index 28b217eb934ea68d12ffe76185ab47bb461655b4..fd155fabf05074ca9ba96a668ff71d5985ae40e4 100644
--- a/Framework/DataHandling/src/SaveGSS.cpp
+++ b/Framework/DataHandling/src/SaveGSS.cpp
@@ -99,7 +99,7 @@ void SaveGSS::init() {
 void getFocusedPos(MatrixWorkspace_const_sptr wksp, const int spectrum,
                    double &l1, double &l2, double &tth, double &difc) {
   Geometry::Instrument_const_sptr instrument = wksp->getInstrument();
-  if (instrument == NULL) {
+  if (instrument == nullptr) {
     l1 = 0.;
     l2 = 0.;
     tth = 0.;
@@ -107,7 +107,7 @@ void getFocusedPos(MatrixWorkspace_const_sptr wksp, const int spectrum,
   }
   Geometry::IComponent_const_sptr source = instrument->getSource();
   Geometry::IComponent_const_sptr sample = instrument->getSample();
-  if (source == NULL || sample == NULL) {
+  if (source == nullptr || sample == nullptr) {
     l1 = 0.;
     l2 = 0.;
     tth = 0.;
@@ -206,7 +206,7 @@ void SaveGSS::writeGSASFile(const std::string &outfilename, bool append,
   Geometry::IComponent_const_sptr source;
   Geometry::IComponent_const_sptr sample;
   bool has_instrument = false;
-  if (instrument != NULL) {
+  if (instrument != nullptr) {
     source = instrument->getSource();
     sample = instrument->getSample();
     if (source && sample)
@@ -379,7 +379,7 @@ void writeLogValue(std::ostream &os, const Run &runinfo,
   Kernel::Property *prop = runinfo.getProperty(name);
 
   // Return without a valid pointer to property
-  if (prop == NULL) {
+  if (prop == nullptr) {
     os << defValue;
     return;
   }
@@ -430,7 +430,7 @@ void SaveGSS::writeHeaders(const std::string &format, std::stringstream &os,
     // the instrument parameter file
     if (runinfo.hasProperty("iparm_file")) {
       Kernel::Property *prop = runinfo.getProperty("iparm_file");
-      if (prop != NULL && (!prop->value().empty())) {
+      if (prop != nullptr && (!prop->value().empty())) {
         std::stringstream line;
         line << "#Instrument parameter file: " << prop->value();
         os << std::setw(80) << std::left << line.str() << "\n";
diff --git a/Framework/DataHandling/src/SaveISISNexus.cpp b/Framework/DataHandling/src/SaveISISNexus.cpp
index 727565fad93b68c7c109331fce63c212df348bac..a58603e8da45e88a571923a45e44263b3c5440e5 100644
--- a/Framework/DataHandling/src/SaveISISNexus.cpp
+++ b/Framework/DataHandling/src/SaveISISNexus.cpp
@@ -100,7 +100,7 @@ void SaveISISNexus::exec() {
 
   m_isisRaw = new ISISRAW2;
   rawFile = fopen(inputFilename.c_str(), "rb");
-  if (rawFile == NULL) {
+  if (rawFile == nullptr) {
     throw Exception::FileError("Cannot open file ", inputFilename);
   }
   m_isisRaw->ioRAW(rawFile, true);
diff --git a/Framework/DataHandling/src/SaveNexusProcessed.cpp b/Framework/DataHandling/src/SaveNexusProcessed.cpp
index b1cce74d4f66a368b3c58901ee6d4a0f3c64c1eb..29f58d9ddc6f6c4313d7daa393cff049e57e3dab 100644
--- a/Framework/DataHandling/src/SaveNexusProcessed.cpp
+++ b/Framework/DataHandling/src/SaveNexusProcessed.cpp
@@ -384,10 +384,10 @@ void SaveNexusProcessed::execEvent(Mantid::NeXus::NexusFileIO *nexusFile,
 
   // Initialize all the arrays
   int64_t num = index;
-  double *tofs = NULL;
-  float *weights = NULL;
-  float *errorSquareds = NULL;
-  int64_t *pulsetimes = NULL;
+  double *tofs = nullptr;
+  float *weights = nullptr;
+  float *errorSquareds = nullptr;
+  int64_t *pulsetimes = nullptr;
 
   // overall event type.
   EventType type = m_eventWorkspace->getEventType();
diff --git a/Framework/DataHandling/src/SaveToSNSHistogramNexus.cpp b/Framework/DataHandling/src/SaveToSNSHistogramNexus.cpp
index 08ad02866b44a02b1c19431bd6574ee8e997b2ab..aa8b9685036511c8fb70928d1414acc588e809b9 100644
--- a/Framework/DataHandling/src/SaveToSNSHistogramNexus.cpp
+++ b/Framework/DataHandling/src/SaveToSNSHistogramNexus.cpp
@@ -93,7 +93,7 @@ int SaveToSNSHistogramNexus::add_path(const char *path) {
 int SaveToSNSHistogramNexus::remove_path(const char *path) {
   char *tstr;
   tstr = strrchr(current_path, '/');
-  if (tstr != NULL && !strcmp(path, tstr + 1)) {
+  if (tstr != nullptr && !strcmp(path, tstr + 1)) {
     *tstr = '\0';
   } else {
     printf("path error\n");
@@ -277,7 +277,7 @@ int SaveToSNSHistogramNexus::WriteOutDataOrErrors(
       new float[slabDimensions[0] * slabDimensions[1] * slabDimensions[2]];
 
   // Only allocate an array for errors if it is needed
-  float *errors = NULL;
+  float *errors = nullptr;
   if (doBoth)
     errors =
         new float[slabDimensions[0] * slabDimensions[1] * slabDimensions[2]];
diff --git a/Framework/DataHandling/src/SetScalingPSD.cpp b/Framework/DataHandling/src/SetScalingPSD.cpp
index bc5384007eb233fe5d6e3b0f1b3225791389394a..806bbed22171e1b76eb9a70e21fed10dddfb76f3 100644
--- a/Framework/DataHandling/src/SetScalingPSD.cpp
+++ b/Framework/DataHandling/src/SetScalingPSD.cpp
@@ -340,7 +340,7 @@ void SetScalingPSD::getDetPositionsFromRaw(std::string rawfile,
   (void)rawfile; // Avoid compiler warning
 
   // open raw file
-  ISISRAW iraw(NULL);
+  ISISRAW iraw(nullptr);
   if (iraw.readFromFile(m_filename.c_str(), false) != 0) {
     g_log.error("Unable to open file " + m_filename);
     throw Exception::FileError("Unable to open File:", m_filename);
diff --git a/Framework/DataObjects/src/AffineMatrixParameter.cpp b/Framework/DataObjects/src/AffineMatrixParameter.cpp
index 6c1a42ea72f5cf768f8486f8e2d24213a7777b4f..f520c6fdf2f1b5bc5d05b75c61823aa26c0b92b1 100644
--- a/Framework/DataObjects/src/AffineMatrixParameter.cpp
+++ b/Framework/DataObjects/src/AffineMatrixParameter.cpp
@@ -30,11 +30,11 @@ AffineMatrixParameter::AffineMatrixParameter(size_t outD, size_t inD)
 AffineMatrixParameter::~AffineMatrixParameter() {
   // delete array of pointers to rows
   delete[] m_rawMatrix;
-  m_rawMatrix = NULL;
+  m_rawMatrix = nullptr;
 
   // delete large mem block holding the matrix
   delete[] m_rawMem;
-  m_rawMem = NULL;
+  m_rawMem = nullptr;
 }
 
 //----------------------------------------------------------------------------------------------
diff --git a/Framework/DataObjects/src/BoxControllerNeXusIO.cpp b/Framework/DataObjects/src/BoxControllerNeXusIO.cpp
index a922c6b631fefa816706154fad99c074da65b6c7..f1386cad652075c22b2304e45768d9a96532febc 100644
--- a/Framework/DataObjects/src/BoxControllerNeXusIO.cpp
+++ b/Framework/DataObjects/src/BoxControllerNeXusIO.cpp
@@ -24,7 +24,7 @@ std::string BoxControllerNeXusIO::g_DBDataName("free_space_blocks");
  @param bc shared pointer to the box controller which uses this IO operations
 */
 BoxControllerNeXusIO::BoxControllerNeXusIO(API::BoxController *const bc)
-    : m_File(NULL), m_ReadOnly(true), m_dataChunk(DATA_CHUNK), m_bc(bc),
+    : m_File(nullptr), m_ReadOnly(true), m_dataChunk(DATA_CHUNK), m_bc(bc),
       m_BlockStart(2, 0), m_BlockSize(2, 0), m_CoordSize(sizeof(coord_t)),
       m_EventType(FatEvent), m_EventsVersion("1.0"),
       m_ReadConversion(noConversion) {
@@ -487,7 +487,7 @@ void BoxControllerNeXusIO::closeFile() {
       m_File->close();      // close NeXus file
 
       delete m_File;
-      m_File = NULL;
+      m_File = nullptr;
     }
   }
 }
diff --git a/Framework/DataObjects/src/CoordTransformAffine.cpp b/Framework/DataObjects/src/CoordTransformAffine.cpp
index 4041da787391e49b7ac4f6f6945bb8dba9795024..de51591b167a0c9e37d4507482568f686c9a349c 100644
--- a/Framework/DataObjects/src/CoordTransformAffine.cpp
+++ b/Framework/DataObjects/src/CoordTransformAffine.cpp
@@ -27,7 +27,7 @@ namespace DataObjects {
  */
 CoordTransformAffine::CoordTransformAffine(const size_t inD, const size_t outD)
     : CoordTransform(inD, outD), m_affineMatrix(outD + 1, inD + 1),
-      m_rawMatrix(NULL), m_rawMemory(NULL) {
+      m_rawMatrix(nullptr), m_rawMemory(nullptr) {
   m_affineMatrix.identityMatrix();
 
   // Allocate the raw matrix
@@ -49,11 +49,11 @@ CoordTransformAffine::CoordTransformAffine(const size_t inD, const size_t outD)
 CoordTransformAffine::~CoordTransformAffine() {
   // delete array of pointers to rows
   delete[] m_rawMatrix;
-  m_rawMatrix = NULL;
+  m_rawMatrix = nullptr;
 
   // delete large mem block holding the matrix
   delete[] m_rawMemory;
-  m_rawMemory = NULL;
+  m_rawMemory = nullptr;
 }
 
 //----------------------------------------------------------------------------------------------
diff --git a/Framework/DataObjects/src/EventList.cpp b/Framework/DataObjects/src/EventList.cpp
index da0f6969ab56361ed37cf4d59f7bf45281edce75..18f5ba3e9166cad1c07e0d0be44657dc91d80014 100644
--- a/Framework/DataObjects/src/EventList.cpp
+++ b/Framework/DataObjects/src/EventList.cpp
@@ -123,7 +123,7 @@ bool compareEventPulseTimeTOF(const TofEvent &e1, const TofEvent &e2) {
 
 /// Constructor (empty)
 EventList::EventList()
-    : eventType(TOF), order(UNSORTED), mru(NULL), m_lockedMRU(false) {}
+    : eventType(TOF), order(UNSORTED), mru(nullptr), m_lockedMRU(false) {}
 
 /** Constructor with a MRU list
  * @param mru :: pointer to the MRU of the parent EventWorkspace
@@ -144,7 +144,7 @@ EventList::EventList(const EventList &rhs)
 /** Constructor, taking a vector of events.
  * @param events :: Vector of TofEvent's */
 EventList::EventList(const std::vector<TofEvent> &events)
-    : mru(NULL), m_lockedMRU(false) {
+    : mru(nullptr), m_lockedMRU(false) {
   this->events.assign(events.begin(), events.end());
   this->eventType = TOF;
   this->order = UNSORTED;
@@ -153,7 +153,7 @@ EventList::EventList(const std::vector<TofEvent> &events)
 /** Constructor, taking a vector of events.
  * @param events :: Vector of WeightedEvent's */
 EventList::EventList(const std::vector<WeightedEvent> &events)
-    : mru(NULL), m_lockedMRU(false) {
+    : mru(nullptr), m_lockedMRU(false) {
   this->weightedEvents.assign(events.begin(), events.end());
   this->eventType = WEIGHTED;
   this->order = UNSORTED;
@@ -162,7 +162,7 @@ EventList::EventList(const std::vector<WeightedEvent> &events)
 /** Constructor, taking a vector of events.
  * @param events :: Vector of WeightedEventNoTime's */
 EventList::EventList(const std::vector<WeightedEventNoTime> &events)
-    : mru(NULL), m_lockedMRU(false) {
+    : mru(nullptr), m_lockedMRU(false) {
   this->weightedEventsNoTime.assign(events.begin(), events.end());
   this->eventType = WEIGHTED_NOTIME;
   this->order = UNSORTED;
@@ -1542,7 +1542,7 @@ const MantidVec &EventList::constDataY() const {
   MantidVecWithMarker *yData;
   yData = mru->findY(thread, this->m_specNo);
 
-  if (yData == NULL) {
+  if (yData == nullptr) {
     // Create the MRU object
     yData = new MantidVecWithMarker(this->m_specNo, this->m_lockedMRU);
 
@@ -1584,7 +1584,7 @@ const MantidVec &EventList::constDataE() const {
   MantidVecWithMarker *eData;
   eData = mru->findE(thread, this->m_specNo);
 
-  if (eData == NULL) {
+  if (eData == nullptr) {
     // Create the MRU object
     eData = new MantidVecWithMarker(this->m_specNo, this->m_lockedMRU);
 
diff --git a/Framework/DataObjects/src/EventWorkspace.cpp b/Framework/DataObjects/src/EventWorkspace.cpp
index 9a8d68f4f2e030ae6986d9fce4379f9320f4ffda..609868e8adfdaa6b050134855a55d9541adaeb25 100644
--- a/Framework/DataObjects/src/EventWorkspace.cpp
+++ b/Framework/DataObjects/src/EventWorkspace.cpp
@@ -81,7 +81,7 @@ void EventWorkspace::init(const std::size_t &NVectors,
   }
   // Initialize the data
   m_noVectors = NVectors;
-  data.resize(m_noVectors, NULL);
+  data.resize(m_noVectors, nullptr);
   // Make sure SOMETHING exists for all initialized spots.
   for (size_t i = 0; i < m_noVectors; i++)
     data[i] = new EventList(mru, specid_t(i));
@@ -884,7 +884,7 @@ EventSortType EventWorkspace::getSortType() const {
 void EventWorkspace::sortAll(EventSortType sortType,
                              Mantid::API::Progress *prog) const {
   if (this->getSortType() == sortType) {
-    if (prog != NULL) {
+    if (prog != nullptr) {
       prog->reportIncrement(this->data.size());
     }
     return;
diff --git a/Framework/DataObjects/src/EventWorkspaceMRU.cpp b/Framework/DataObjects/src/EventWorkspaceMRU.cpp
index 76ca4af7db542c57767e872e11fd9a7760dd6562..2d7a5dafc58c307fd60e019db4a11981824e969a 100644
--- a/Framework/DataObjects/src/EventWorkspaceMRU.cpp
+++ b/Framework/DataObjects/src/EventWorkspaceMRU.cpp
@@ -43,7 +43,7 @@ EventWorkspaceMRU::~EventWorkspaceMRU() {
 void EventWorkspaceMRU::ensureEnoughBuffersE(size_t thread_num) const {
   Mutex::ScopedLock _lock(m_changeMruListsMutexE);
   if (m_bufferedDataE.size() <= thread_num) {
-    m_bufferedDataE.resize(thread_num + 1, NULL);
+    m_bufferedDataE.resize(thread_num + 1, nullptr);
     for (size_t i = 0; i < m_bufferedDataE.size(); i++) {
       if (!m_bufferedDataE[i])
         m_bufferedDataE[i] =
@@ -59,7 +59,7 @@ void EventWorkspaceMRU::ensureEnoughBuffersE(size_t thread_num) const {
 void EventWorkspaceMRU::ensureEnoughBuffersY(size_t thread_num) const {
   Mutex::ScopedLock _lock(m_changeMruListsMutexY);
   if (m_bufferedDataY.size() <= thread_num) {
-    m_bufferedDataY.resize(thread_num + 1, NULL);
+    m_bufferedDataY.resize(thread_num + 1, nullptr);
     for (size_t i = 0; i < m_bufferedDataY.size(); i++) {
       if (!m_bufferedDataY[i])
         m_bufferedDataY[i] =
diff --git a/Framework/DataObjects/src/MDBoxFlatTree.cpp b/Framework/DataObjects/src/MDBoxFlatTree.cpp
index 119a9e829f5cb041bb29ee86995062cb0278fbd9..6d419c9937b0123aa0d701f3da84f229f2b3006a 100644
--- a/Framework/DataObjects/src/MDBoxFlatTree.cpp
+++ b/Framework/DataObjects/src/MDBoxFlatTree.cpp
@@ -505,7 +505,7 @@ uint64_t MDBoxFlatTree::restoreBoxTree(std::vector<API::IMDNode *> &Boxes,
                                        bool BoxStructureOnly) {
 
   size_t numBoxes = this->getNBoxes();
-  Boxes.assign(numBoxes, NULL);
+  Boxes.assign(numBoxes, nullptr);
 
   uint64_t totalNumEvents(0);
   m_nDim = static_cast<int>(bc->getNDims());
@@ -529,7 +529,7 @@ uint64_t MDBoxFlatTree::restoreBoxTree(std::vector<API::IMDNode *> &Boxes,
     if (box_type == 0)
       continue;
 
-    API::IMDNode *ibox = NULL;
+    API::IMDNode *ibox = nullptr;
 
     // Extents of the box, as a vector
     std::vector<Mantid::Geometry::MDDimensionExtents<coord_t>> extentsVector(
diff --git a/Framework/DataObjects/src/MDEventFactory.cpp b/Framework/DataObjects/src/MDEventFactory.cpp
index 21fce921ffa79c6e0898a8d03a8b2754971a7f79..d487fd9bb9fd4204c488a0706183d77e587cbcfb 100644
--- a/Framework/DataObjects/src/MDEventFactory.cpp
+++ b/Framework/DataObjects/src/MDEventFactory.cpp
@@ -254,11 +254,11 @@ API::IMDNode *MDEventFactory::createBox(
 /// static vector, conaining the pointers to the functions creating MD boxes
 std::vector<MDEventFactory::fpCreateBox> MDEventFactory::boxCreatorFP(
     MDEventFactory::NumBoxTypes *(MDEventFactory::MAX_MD_DIMENSIONS_NUM + 1),
-    NULL);
+    nullptr);
 // static vector, conaining the pointers to the functions creating MD Workspaces
 std::vector<MDEventFactory::fpCreateMDWS>
     MDEventFactory::wsCreatorFP(MDEventFactory::MAX_MD_DIMENSIONS_NUM + 1,
-                                NULL);
+                                nullptr);
 
 //########### Teplate methaprogrammed CODE SOURCE start:
 //-------------------------------------
diff --git a/Framework/DataObjects/src/MDHistoWorkspace.cpp b/Framework/DataObjects/src/MDHistoWorkspace.cpp
index 15b6e08e45047807174a4a7ae84d6317f6a5d386..11948bda58bba5a27e426fa6c28e38c97fe8c827 100644
--- a/Framework/DataObjects/src/MDHistoWorkspace.cpp
+++ b/Framework/DataObjects/src/MDHistoWorkspace.cpp
@@ -62,7 +62,7 @@ MDHistoWorkspace::MDHistoWorkspace(
 MDHistoWorkspace::MDHistoWorkspace(
     std::vector<Mantid::Geometry::MDHistoDimension_sptr> &dimensions,
     Mantid::API::MDNormalization displayNormalization)
-    : IMDHistoWorkspace(), numDimensions(0), m_numEvents(NULL),
+    : IMDHistoWorkspace(), numDimensions(0), m_numEvents(nullptr),
       m_nEventsContributed(std::numeric_limits<uint64_t>::quiet_NaN()),
       m_coordSystem(None), m_displayNormalization(displayNormalization) {
   this->init(dimensions);
@@ -77,7 +77,7 @@ MDHistoWorkspace::MDHistoWorkspace(
 MDHistoWorkspace::MDHistoWorkspace(
     std::vector<Mantid::Geometry::IMDDimension_sptr> &dimensions,
     Mantid::API::MDNormalization displayNormalization)
-    : IMDHistoWorkspace(), numDimensions(0), m_numEvents(NULL),
+    : IMDHistoWorkspace(), numDimensions(0), m_numEvents(nullptr),
       m_nEventsContributed(std::numeric_limits<uint64_t>::quiet_NaN()),
       m_coordSystem(None), m_displayNormalization(displayNormalization) {
   this->init(dimensions);
@@ -1214,7 +1214,7 @@ Does not perform any clearing. Multiple calls are compounded.
 */
 void MDHistoWorkspace::setMDMasking(
     Mantid::Geometry::MDImplicitFunction *maskingRegion) {
-  if (maskingRegion != NULL) {
+  if (maskingRegion != nullptr) {
     for (size_t i = 0; i < this->getNPoints(); ++i) {
       // If the function masks the point, then mask it, otherwise leave it as it
       // is.
diff --git a/Framework/DataObjects/src/MDHistoWorkspaceIterator.cpp b/Framework/DataObjects/src/MDHistoWorkspaceIterator.cpp
index 9f8016d0feb9a7e1296f88983287b1e64dd9e2a1..34b37f2886340ea68f82d41d4432fa4a83fc7332 100644
--- a/Framework/DataObjects/src/MDHistoWorkspaceIterator.cpp
+++ b/Framework/DataObjects/src/MDHistoWorkspaceIterator.cpp
@@ -155,7 +155,7 @@ void MDHistoWorkspaceIterator::init(
     Mantid::Geometry::MDImplicitFunction *function, size_t beginPos,
     size_t endPos) {
   m_ws = workspace;
-  if (m_ws == NULL)
+  if (m_ws == nullptr)
     throw std::invalid_argument(
         "MDHistoWorkspaceIterator::ctor(): NULL workspace given.");
 
@@ -245,7 +245,7 @@ MDHistoWorkspaceIterator::~MDHistoWorkspaceIterator() {
 
   if (m_function)
     delete m_function;
-  m_function = NULL;
+  m_function = nullptr;
 }
 
 //----------------------------------------------------------------------------------------------
diff --git a/Framework/DataObjects/src/Peak.cpp b/Framework/DataObjects/src/Peak.cpp
index 412f64c13970708fd6ccd14dc2a77cccc4e3e955..b955505d33e36add0f709a3254e435c7e8a0ed6f 100644
--- a/Framework/DataObjects/src/Peak.cpp
+++ b/Framework/DataObjects/src/Peak.cpp
@@ -341,12 +341,12 @@ void Peak::setInstrument(Geometry::Instrument_const_sptr inst) {
 
   // Cache some positions
   const Geometry::IComponent_const_sptr sourceObj = m_inst->getSource();
-  if (sourceObj == NULL)
+  if (sourceObj == nullptr)
     throw Exception::InstrumentDefinitionError("Peak::setInstrument(): Failed "
                                                "to get source component from "
                                                "instrument");
   const Geometry::IComponent_const_sptr sampleObj = m_inst->getSample();
-  if (sampleObj == NULL)
+  if (sampleObj == nullptr)
     throw Exception::InstrumentDefinitionError("Peak::setInstrument(): Failed "
                                                "to get sample component from "
                                                "instrument");
@@ -940,7 +940,7 @@ accessing its position. Throws if null.
 */
 Mantid::Kernel::V3D Peak::getDetectorPosition() const {
   auto det = getDetector();
-  if (det == NULL) {
+  if (det == nullptr) {
     throw Mantid::Kernel::Exception::NullPointerException("Peak", "Detector");
   }
   return getDetector()->getPos();
diff --git a/Framework/DataObjects/src/PeakShapeEllipsoidFactory.cpp b/Framework/DataObjects/src/PeakShapeEllipsoidFactory.cpp
index ffc4bd4b9a6c070d8942ec2a7b98fb5744d6c94c..6c1d1782d0096fd5ffd57749c59b7bb6af38b942 100644
--- a/Framework/DataObjects/src/PeakShapeEllipsoidFactory.cpp
+++ b/Framework/DataObjects/src/PeakShapeEllipsoidFactory.cpp
@@ -29,7 +29,7 @@ Mantid::Geometry::PeakShape *
 PeakShapeEllipsoidFactory::create(const std::string &source) const {
   Json::Reader reader;
   Json::Value root;
-  Mantid::Geometry::PeakShape *product = NULL;
+  Mantid::Geometry::PeakShape *product = nullptr;
   if (reader.parse(source, root)) {
     const std::string shape = root["shape"].asString();
     if (shape == PeakShapeEllipsoid::ellipsoidShapeName()) {
diff --git a/Framework/DataObjects/src/PeakShapeSphericalFactory.cpp b/Framework/DataObjects/src/PeakShapeSphericalFactory.cpp
index a7a17ce2a2620dfc6f283c272e74c2fe0a7a336f..970cea2322c5006f714b99dfd8de1529d72a4687 100644
--- a/Framework/DataObjects/src/PeakShapeSphericalFactory.cpp
+++ b/Framework/DataObjects/src/PeakShapeSphericalFactory.cpp
@@ -28,7 +28,7 @@ Mantid::Geometry::PeakShape *
 PeakShapeSphericalFactory::create(const std::string &source) const {
   Json::Reader reader;
   Json::Value root;
-  Mantid::Geometry::PeakShape *product = NULL;
+  Mantid::Geometry::PeakShape *product = nullptr;
   if (reader.parse(source, root)) {
     const std::string shape = root["shape"].asString();
     if (shape == PeakShapeSpherical::sphereShapeName()) {
diff --git a/Framework/DataObjects/src/ReflectometryTransform.cpp b/Framework/DataObjects/src/ReflectometryTransform.cpp
index ce6bbb034ef090e7c18c370bb0fd7fae18b77662..950126961cfaae3c0e45bf42b9dd12c801bf8599 100644
--- a/Framework/DataObjects/src/ReflectometryTransform.cpp
+++ b/Framework/DataObjects/src/ReflectometryTransform.cpp
@@ -313,7 +313,7 @@ Mantid::API::IMDEventWorkspace_sptr ReflectometryTransform::executeMD(
                                   centers));
     }
   }
-  ws->splitAllIfNeeded(NULL);
+  ws->splitAllIfNeeded(nullptr);
   ws->refreshCache();
   return ws;
 }
diff --git a/Framework/Geometry/src/ComponentParser.cpp b/Framework/Geometry/src/ComponentParser.cpp
index 61e808d2ba832783b603bd7c60190bdd4c09746c..ca5e689aa665d8e89564a8e4b334cd257c6c1023 100644
--- a/Framework/Geometry/src/ComponentParser.cpp
+++ b/Framework/Geometry/src/ComponentParser.cpp
@@ -20,7 +20,7 @@ Component *ComponentParser::getComponent() {
   if (m_current.size() > 0)
     return m_current[0];
   else
-    return NULL;
+    return nullptr;
 }
 
 void ComponentParser::characters(const Poco::XML::XMLChar ch[], int start,
@@ -35,7 +35,7 @@ void ComponentParser::startElement(const Poco::XML::XMLString &,
                                    const Poco::XML::XMLString &,
                                    const Poco::XML::Attributes &attr) {
   // Find the parent of this new component.
-  Component *current = NULL;
+  Component *current = nullptr;
   if (!m_current.empty())
     current = m_current.back();
 
@@ -45,7 +45,7 @@ void ComponentParser::startElement(const Poco::XML::XMLString &,
   // Find the name in the attributes
   std::string name = attr.getValue("", "name");
 
-  Component *newComp = NULL;
+  Component *newComp = nullptr;
   if (localName == "Component")
     newComp = new Component(name, current);
   else {
@@ -66,7 +66,7 @@ void ComponentParser::startElement(const Poco::XML::XMLString &,
 void ComponentParser::endElement(const Poco::XML::XMLString &,
                                  const Poco::XML::XMLString &localName,
                                  const Poco::XML::XMLString &) {
-  Component *current = NULL;
+  Component *current = nullptr;
   if (!m_current.empty())
     current = m_current.back();
 
diff --git a/Framework/Geometry/src/IObjComponent.cpp b/Framework/Geometry/src/IObjComponent.cpp
index ff0837baf7746ca740ce821388f3946832d81797..a922c367caf7c5d45b5b1d490808e3de6b26e386 100644
--- a/Framework/Geometry/src/IObjComponent.cpp
+++ b/Framework/Geometry/src/IObjComponent.cpp
@@ -20,7 +20,7 @@ IObjComponent::IObjComponent(GeometryHandler *the_handler) {
 // Looking to get rid of the first of these constructors in due course (and
 // probably add others)
 IObjComponent::~IObjComponent() {
-  if (handle != NULL)
+  if (handle != nullptr)
     delete handle;
 }
 
@@ -30,7 +30,7 @@ IObjComponent::~IObjComponent() {
  * the calling function.
  */
 void IObjComponent::setGeometryHandler(GeometryHandler *h) {
-  if (h == NULL)
+  if (h == nullptr)
     return;
   this->handle = h;
 }
diff --git a/Framework/Geometry/src/Instrument.cpp b/Framework/Geometry/src/Instrument.cpp
index adecb4b35ad904951e0c902271dedfa040f9b34e..c9415942c81d55da0154cda4d0db2af956b9ddaa 100644
--- a/Framework/Geometry/src/Instrument.cpp
+++ b/Framework/Geometry/src/Instrument.cpp
@@ -19,15 +19,15 @@ Kernel::Logger g_log("Instrument");
 
 /// Default constructor
 Instrument::Instrument()
-    : CompAssembly(), m_detectorCache(), m_sourceCache(0),
-      m_chopperPoints(new std::vector<const ObjComponent *>), m_sampleCache(0),
+    : CompAssembly(), m_detectorCache(), m_sourceCache(nullptr),
+      m_chopperPoints(new std::vector<const ObjComponent *>), m_sampleCache(nullptr),
       m_defaultView("3D"), m_defaultViewAxis("Z+"),
       m_referenceFrame(new ReferenceFrame) {}
 
 /// Constructor with name
 Instrument::Instrument(const std::string &name)
-    : CompAssembly(name), m_detectorCache(), m_sourceCache(0),
-      m_chopperPoints(new std::vector<const ObjComponent *>), m_sampleCache(0),
+    : CompAssembly(name), m_detectorCache(), m_sourceCache(nullptr),
+      m_chopperPoints(new std::vector<const ObjComponent *>), m_sampleCache(nullptr),
       m_defaultView("3D"), m_defaultViewAxis("Z+"),
       m_referenceFrame(new ReferenceFrame) {}
 
@@ -50,9 +50,9 @@ Instrument::Instrument(const boost::shared_ptr<const Instrument> instr,
  *  in indirect instruments.
  */
 Instrument::Instrument(const Instrument &instr)
-    : CompAssembly(instr), m_sourceCache(NULL),
+    : CompAssembly(instr), m_sourceCache(nullptr),
       m_chopperPoints(new std::vector<const ObjComponent *>),
-      m_sampleCache(NULL), /* Should only be temporarily null */
+      m_sampleCache(nullptr), /* Should only be temporarily null */
       m_logfileCache(instr.m_logfileCache), m_logfileUnit(instr.m_logfileUnit),
       m_monitorCache(instr.m_monitorCache), m_defaultView(instr.m_defaultView),
       m_defaultViewAxis(instr.m_defaultViewAxis), m_instr(),
@@ -483,7 +483,7 @@ IDetector_const_sptr Instrument::getDetector(const detid_t &detector_id) const {
 const IDetector *Instrument::getBaseDetector(const detid_t &detector_id) const {
   auto it = m_instr->m_detectorCache.find(detector_id);
   if (it == m_instr->m_detectorCache.end()) {
-    return NULL;
+    return nullptr;
   }
   return it->second.get();
 }
@@ -495,7 +495,7 @@ bool Instrument::isMonitor(const detid_t &detector_id) const {
     return false;
   // This is the detector
   const Detector *det = dynamic_cast<const Detector *>(it->second.get());
-  if (det == NULL)
+  if (det == nullptr)
     return false;
   return det->isMonitor();
 }
@@ -527,7 +527,7 @@ bool Instrument::isDetectorMasked(const detid_t &detector_id) const {
     return false;
   // This is the detector
   const Detector *det = dynamic_cast<const Detector *>(it->second.get());
-  if (det == NULL)
+  if (det == nullptr)
     return false;
   // Access the parameter map directly.
   Parameter_sptr maskedParam = m_map->get(det, "masked");
@@ -976,7 +976,7 @@ void Instrument::getInstrumentParameters(double &l1, Kernel::V3D &beamline,
                                          Kernel::V3D &samplePos) const {
   // Get some positions
   const IComponent_const_sptr sourceObj = this->getSource();
-  if (sourceObj == NULL) {
+  if (sourceObj == nullptr) {
     throw Exception::InstrumentDefinitionError(
         "Failed to get source component from instrument");
   }
diff --git a/Framework/Geometry/src/Instrument/CompAssembly.cpp b/Framework/Geometry/src/Instrument/CompAssembly.cpp
index 7c73ef1e6b9d42ab68a7fe68b79f97ca68ce141d..c2f18df7918217733bc933fc1f97ab5bc09daf71 100644
--- a/Framework/Geometry/src/Instrument/CompAssembly.cpp
+++ b/Framework/Geometry/src/Instrument/CompAssembly.cpp
@@ -16,14 +16,14 @@ using Kernel::Quat;
 /** Empty constructor
  */
 CompAssembly::CompAssembly()
-    : Component(), m_children(), m_cachedBoundingBox(NULL) {}
+    : Component(), m_children(), m_cachedBoundingBox(nullptr) {}
 
 /** Constructor for a parametrized CompAssembly
  * @param base: the base (un-parametrized) IComponent
  * @param map: pointer to the ParameterMap
  * */
 CompAssembly::CompAssembly(const IComponent *base, const ParameterMap *map)
-    : Component(base, map), m_children(), m_cachedBoundingBox(NULL) {}
+    : Component(base, map), m_children(), m_cachedBoundingBox(nullptr) {}
 
 /** Valued constructor
  *  @param n :: name of the assembly
@@ -35,7 +35,7 @@ CompAssembly::CompAssembly(const IComponent *base, const ParameterMap *map)
  *  this is registered as a children of reference.
  */
 CompAssembly::CompAssembly(const std::string &n, IComponent *reference)
-    : Component(n, reference), m_children(), m_cachedBoundingBox(NULL) {
+    : Component(n, reference), m_children(), m_cachedBoundingBox(nullptr) {
   if (reference) {
     ICompAssembly *test = dynamic_cast<ICompAssembly *>(reference);
     if (test) {
diff --git a/Framework/Geometry/src/Instrument/Component.cpp b/Framework/Geometry/src/Instrument/Component.cpp
index 72bb0aa8be0544fcc1b2a796d0ca6a084abd8c1b..4d3672ac85fb7ed071eb629e12749f731b506aaa 100644
--- a/Framework/Geometry/src/Instrument/Component.cpp
+++ b/Framework/Geometry/src/Instrument/Component.cpp
@@ -15,7 +15,7 @@ using Kernel::Quat;
 * @param map :: a ParameterMap to parameterize the component
 */
 Component::Component(const IComponent *base, const ParameterMap *map)
-    : m_parent(NULL), m_base(dynamic_cast<const Component *>(base)),
+    : m_parent(nullptr), m_base(dynamic_cast<const Component *>(base)),
       m_map(map) {
   if (!m_base) {
     throw std::invalid_argument(
@@ -28,14 +28,14 @@ Component::Component(const IComponent *base, const ParameterMap *map)
 *  Create a component with null parent
 */
 Component::Component()
-    : m_parent(NULL), m_base(NULL), m_map(NULL), m_name(), m_pos(), m_rot() {}
+    : m_parent(nullptr), m_base(nullptr), m_map(nullptr), m_name(), m_pos(), m_rot() {}
 
 /** Constructor by value
 *  @param name :: Component name
 *  @param parent :: parent Component (optional)
 */
 Component::Component(const std::string &name, IComponent *parent)
-    : m_parent(parent), m_base(NULL), m_map(NULL), m_name(name), m_pos(),
+    : m_parent(parent), m_base(nullptr), m_map(nullptr), m_name(name), m_pos(),
       m_rot() {}
 
 /** Constructor by value
@@ -46,7 +46,7 @@ Component::Component(const std::string &name, IComponent *parent)
 */
 Component::Component(const std::string &name, const V3D &position,
                      IComponent *parent)
-    : m_parent(parent), m_base(NULL), m_map(NULL), m_name(name),
+    : m_parent(parent), m_base(nullptr), m_map(nullptr), m_name(name),
       m_pos(position), m_rot() {}
 
 /** Constructor
@@ -57,7 +57,7 @@ Component::Component(const std::string &name, const V3D &position,
 */
 Component::Component(const std::string &name, const V3D &position,
                      const Quat &rotation, IComponent *parent)
-    : m_parent(parent), m_base(NULL), m_map(NULL), m_name(name),
+    : m_parent(parent), m_base(nullptr), m_map(nullptr), m_name(name),
       m_pos(position), m_rot(rotation) {}
 
 /// Destructor
@@ -67,7 +67,7 @@ Component::~Component() {}
 /** Return true if the Component is, in fact, parametrized
 *  (that is - it has a valid parameter map)
 */
-bool Component::isParametrized() const { return (m_map != NULL); }
+bool Component::isParametrized() const { return (m_map != nullptr); }
 
 /** Clone method
 *  Make a copy of the Component
diff --git a/Framework/Geometry/src/Instrument/ComponentHelper.cpp b/Framework/Geometry/src/Instrument/ComponentHelper.cpp
index f624aff34c303918a433975736271994c4302eab..e3ac86ae5d14875ad27337c17c2ab5134ab0f54a 100644
--- a/Framework/Geometry/src/Instrument/ComponentHelper.cpp
+++ b/Framework/Geometry/src/Instrument/ComponentHelper.cpp
@@ -133,7 +133,7 @@ createMinimalInstrument(const Mantid::Kernel::V3D &sourcePos,
   instrument->markAsSamplePos(sample);
 
   // A detector
-  Detector *det = new Detector("point-detector", 1 /*detector id*/, NULL);
+  Detector *det = new Detector("point-detector", 1 /*detector id*/, nullptr);
   det->setPos(detectorPos);
   det->setShape(createSphere(0.01 /*1cm*/, V3D(0, 0, 0), "1"));
   instrument->add(det);
@@ -169,7 +169,7 @@ createVirtualInstrument(Kernel::V3D sourcePos, Kernel::V3D samplePos,
   size_t numdets = vecdetpos.size();
   for (size_t i = 0; i < numdets; ++i) {
     Detector *det =
-        new Detector("point-detector", vecdetid[i] /*detector id*/, NULL);
+        new Detector("point-detector", vecdetid[i] /*detector id*/, nullptr);
     det->setPos(vecdetpos[i]);
     // FIXME - should be cubi... pixel
     det->setShape(createSphere(0.01 /*1cm*/, V3D(0, 0, 0), "1"));
diff --git a/Framework/Geometry/src/Instrument/InstrumentDefinitionParser.cpp b/Framework/Geometry/src/Instrument/InstrumentDefinitionParser.cpp
index fec0c50da5fafbdc7fedfba8e10d7081b97e036c..dddd4aacc0a1817465182a8f419a748abe6bb9a2 100644
--- a/Framework/Geometry/src/Instrument/InstrumentDefinitionParser.cpp
+++ b/Framework/Geometry/src/Instrument/InstrumentDefinitionParser.cpp
@@ -52,7 +52,7 @@ Kernel::Logger g_log("InstrumentDefinitionParser");
  */
 InstrumentDefinitionParser::InstrumentDefinitionParser()
     : m_xmlFile(boost::make_shared<NullIDFObject>()),
-      m_cacheFile(boost::make_shared<NullIDFObject>()), m_pDoc(NULL),
+      m_cacheFile(boost::make_shared<NullIDFObject>()), m_pDoc(nullptr),
       m_hasParameterElement_beenSet(false), m_haveDefaultFacing(false),
       m_deltaOffsets(false), m_angleConvertConst(1.0),
       m_indirectPositions(false), m_cachingOption(NoneApplied) {
@@ -69,7 +69,7 @@ InstrumentDefinitionParser::InstrumentDefinitionParser(
     const std::string &filename, const std::string &instName,
     const std::string &xmlText)
     : m_xmlFile(boost::make_shared<NullIDFObject>()),
-      m_cacheFile(boost::make_shared<NullIDFObject>()), m_pDoc(NULL),
+      m_cacheFile(boost::make_shared<NullIDFObject>()), m_pDoc(nullptr),
       m_hasParameterElement_beenSet(false), m_haveDefaultFacing(false),
       m_deltaOffsets(false), m_angleConvertConst(1.0),
       m_indirectPositions(false), m_cachingOption(NoneApplied) {
@@ -89,7 +89,7 @@ InstrumentDefinitionParser::InstrumentDefinitionParser(
     const IDFObject_const_sptr expectedCacheFile, const std::string &instName,
     const std::string &xmlText)
     : m_xmlFile(boost::make_shared<NullIDFObject>()),
-      m_cacheFile(boost::make_shared<NullIDFObject>()), m_pDoc(NULL),
+      m_cacheFile(boost::make_shared<NullIDFObject>()), m_pDoc(nullptr),
       m_hasParameterElement_beenSet(false), m_haveDefaultFacing(false),
       m_deltaOffsets(false), m_angleConvertConst(1.0),
       m_indirectPositions(false), m_cachingOption(NoneApplied) {
@@ -221,7 +221,7 @@ InstrumentDefinitionParser::parseXML(Kernel::ProgressBase *prog) {
   // Get all the type and component element pointers.
   std::vector<Element *> typeElems;
   std::vector<Element *> compElems;
-  for (Node *pNode = pRootElem->firstChild(); pNode != 0;
+  for (Node *pNode = pRootElem->firstChild(); pNode != nullptr;
        pNode = pNode->nextSibling()) {
     auto pElem = dynamic_cast<Element *>(pNode);
     if (pElem) {
@@ -395,7 +395,7 @@ InstrumentDefinitionParser::parseXML(Kernel::ProgressBase *prog) {
       // order they are listed in the IDF. The latter needed to get detector IDs
       // assigned
       // as expected
-      for (Node *pNode = pElem->firstChild(); pNode != 0;
+      for (Node *pNode = pElem->firstChild(); pNode != nullptr;
            pNode = pNode->nextSibling()) {
         auto pChildElem = dynamic_cast<Element *>(pNode);
         if (!pChildElem)
@@ -571,7 +571,7 @@ void InstrumentDefinitionParser::setLocation(Geometry::IComponent *comp,
   // Check if sub-elements <trans> or <rot> of present - for now ignore these if
   // m_deltaOffset = true
 
-  Element *pRecursive = NULL;
+  Element *pRecursive = nullptr;
   Element *tElem = pElem->getChildElement("trans");
   Element *rElem = pElem->getChildElement("rot");
   bool stillTransElement = true;
@@ -589,7 +589,7 @@ void InstrumentDefinitionParser::setLocation(Geometry::IComponent *comp,
 
     if (tElem && rElem) {
       // if both a <trans> and <rot> child element present. Ignore <rot> element
-      rElem = NULL;
+      rElem = nullptr;
     }
 
     if (!tElem && !rElem) {
@@ -1024,7 +1024,7 @@ void InstrumentDefinitionParser::appendAssembly(
       Element *pFound =
           pCompElem->ownerDocument()->getElementById(idlist, "idname");
 
-      if (pFound == NULL) {
+      if (pFound == nullptr) {
         throw Kernel::Exception::InstrumentDefinitionError(
             "No <idlist> with name idname=\"" + idlist +
                 "\" present in instrument definition file.",
@@ -1196,7 +1196,7 @@ void InstrumentDefinitionParser::appendLeaf(Geometry::ICompAssembly *parent,
       Element *pFound =
           pCompElem->ownerDocument()->getElementById(idlist, "idname");
 
-      if (pFound == NULL) {
+      if (pFound == nullptr) {
         throw Kernel::Exception::InstrumentDefinitionError(
             "No <idlist> with name idname=\"" + idlist +
                 "\" present in instrument definition file.",
@@ -2393,7 +2393,7 @@ void InstrumentDefinitionParser::adjust(
   // check if a <translate-rotate-combined-shape-to> is defined
   Poco::AutoPtr<NodeList> pNL_TransRot =
       pElem->getElementsByTagName("translate-rotate-combined-shape-to");
-  Element *pTransRot = 0;
+  Element *pTransRot = nullptr;
   if (pNL_TransRot->length() == 1) {
     pTransRot = static_cast<Element *>(pNL_TransRot->item(0));
   }
@@ -2429,7 +2429,7 @@ void InstrumentDefinitionParser::adjust(
     CompAssembly *baseCoor = new CompAssembly(
         "base"); // dummy assembly used to get to end assembly if nested
     ICompAssembly *endComponent =
-        0; // end assembly, its purpose is to hold the shape coordinate system
+        nullptr; // end assembly, its purpose is to hold the shape coordinate system
     // get shape coordinate system, returned as endComponent, as defined by pLoc
     // and nested <location> elements
     // of pLoc
diff --git a/Framework/Geometry/src/Instrument/ObjComponent.cpp b/Framework/Geometry/src/Instrument/ObjComponent.cpp
index 04d2143f861b5b4f5412178e07ad7727d53d0f7c..186f83885a77de1315e1e871819ffa28f47e6d20 100644
--- a/Framework/Geometry/src/Instrument/ObjComponent.cpp
+++ b/Framework/Geometry/src/Instrument/ObjComponent.cpp
@@ -303,7 +303,7 @@ const V3D ObjComponent::takeOutRotation(V3D point) const {
 * nothing.
 */
 void ObjComponent::draw() const {
-  if (Handle() == NULL)
+  if (Handle() == nullptr)
     return;
   // Render the ObjComponent and then render the object
   Handle()->Render();
@@ -313,7 +313,7 @@ void ObjComponent::draw() const {
 * Draws the Object
 */
 void ObjComponent::drawObject() const {
-  if (shape() != NULL)
+  if (shape() != nullptr)
     shape()->draw();
 }
 
@@ -322,10 +322,10 @@ void ObjComponent::drawObject() const {
 * before rendering.
 */
 void ObjComponent::initDraw() const {
-  if (Handle() == NULL)
+  if (Handle() == nullptr)
     return;
   // Render the ObjComponent and then render the object
-  if (shape() != NULL)
+  if (shape() != nullptr)
     shape()->initDraw();
   Handle()->Initialize();
 }
diff --git a/Framework/Geometry/src/Instrument/ParameterMap.cpp b/Framework/Geometry/src/Instrument/ParameterMap.cpp
index f491db4d599a3525dfae215e1f1c446fb4ca0636..c8c0ce2c26b052f39bac3e03f5b1490880b2b9f1 100644
--- a/Framework/Geometry/src/Instrument/ParameterMap.cpp
+++ b/Framework/Geometry/src/Instrument/ParameterMap.cpp
@@ -837,7 +837,7 @@ Parameter_sptr ParameterMap::getByType(const IComponent *comp,
 Parameter_sptr ParameterMap::getRecursiveByType(const IComponent *comp,
                                                 const std::string &type) const {
   boost::shared_ptr<const IComponent> compInFocus(comp, NoDeleting());
-  while (compInFocus != NULL) {
+  while (compInFocus != nullptr) {
     Parameter_sptr param = getByType(compInFocus.get(), type);
     if (param) {
       return param;
diff --git a/Framework/Geometry/src/Instrument/RectangularDetector.cpp b/Framework/Geometry/src/Instrument/RectangularDetector.cpp
index 2c2a8a2ec977b08b1d3bd610363076da028ef926..6fe38e93749cca266bf246ffa29b4fa54898e57f 100644
--- a/Framework/Geometry/src/Instrument/RectangularDetector.cpp
+++ b/Framework/Geometry/src/Instrument/RectangularDetector.cpp
@@ -21,7 +21,7 @@ using Kernel::Matrix;
 /** Empty constructor
  */
 RectangularDetector::RectangularDetector()
-    : CompAssembly(), IObjComponent(NULL), m_rectBase(NULL), m_minDetId(0),
+    : CompAssembly(), IObjComponent(nullptr), m_rectBase(nullptr), m_minDetId(0),
       m_maxDetId(0) {
 
   init();
@@ -34,7 +34,7 @@ RectangularDetector::RectangularDetector()
  * */
 RectangularDetector::RectangularDetector(const RectangularDetector *base,
                                          const ParameterMap *map)
-    : CompAssembly(base, map), IObjComponent(NULL), m_rectBase(base),
+    : CompAssembly(base, map), IObjComponent(nullptr), m_rectBase(base),
       m_minDetId(0), m_maxDetId(0) {
   init();
   setGeometryHandler(new BitmapGeometryHandler(this));
@@ -51,7 +51,7 @@ RectangularDetector::RectangularDetector(const RectangularDetector *base,
  */
 RectangularDetector::RectangularDetector(const std::string &n,
                                          IComponent *reference)
-    : CompAssembly(n, reference), IObjComponent(NULL), m_rectBase(NULL),
+    : CompAssembly(n, reference), IObjComponent(nullptr), m_rectBase(nullptr),
       m_minDetId(0), m_maxDetId(0) {
   init();
   this->setName(n);
@@ -669,7 +669,7 @@ unsigned int RectangularDetector::getTextureID() const { return m_textureID; }
 void RectangularDetector::draw() const {
   // std::cout << "RectangularDetector::draw() called for " << this->getName()
   // << "\n";
-  if (Handle() == NULL)
+  if (Handle() == nullptr)
     return;
   // Render the ObjComponent and then render the object
   Handle()->Render();
@@ -691,7 +691,7 @@ void RectangularDetector::drawObject() const {
 void RectangularDetector::initDraw() const {
   // std::cout << "RectangularDetector::initDraw() called for " <<
   // this->getName() << "\n";
-  if (Handle() == NULL)
+  if (Handle() == nullptr)
     return;
   // Render the ObjComponent and then render the object
   // if(shape!=NULL)    shape->initDraw();
diff --git a/Framework/Geometry/src/MDGeometry/CompositeImplicitFunction.cpp b/Framework/Geometry/src/MDGeometry/CompositeImplicitFunction.cpp
index a68e26b2c1cac4b4da407779b2e7455a13204669..ae7c0a900e204f5c7812fac22abf2515cd212301 100644
--- a/Framework/Geometry/src/MDGeometry/CompositeImplicitFunction.cpp
+++ b/Framework/Geometry/src/MDGeometry/CompositeImplicitFunction.cpp
@@ -21,7 +21,7 @@ CompositeImplicitFunction::~CompositeImplicitFunction() {}
 bool CompositeImplicitFunction::addFunction(
     Mantid::Geometry::MDImplicitFunction_sptr constituentFunction) {
   bool bSuccess = false;
-  if (constituentFunction.get() != NULL) {
+  if (constituentFunction.get() != nullptr) {
     this->m_Functions.push_back(constituentFunction);
     bSuccess = true;
   }
diff --git a/Framework/Geometry/src/MDGeometry/IMDDimensionFactory.cpp b/Framework/Geometry/src/MDGeometry/IMDDimensionFactory.cpp
index a6033082b844e8e99abe2d07fd0a11de10cbee26..8bef79efd77d856578e85e9ab7b4026fc7e5a46e 100644
--- a/Framework/Geometry/src/MDGeometry/IMDDimensionFactory.cpp
+++ b/Framework/Geometry/src/MDGeometry/IMDDimensionFactory.cpp
@@ -47,7 +47,7 @@ IMDDimension_sptr createDimension(const Poco::XML::Element &dimensionXML) {
   }
 
   Poco::XML::Element *nameElement = dimensionXML.getChildElement("Name");
-  if (NULL == nameElement) {
+  if (nullptr == nameElement) {
     throw std::invalid_argument(
         "Invalid string passed to createDimension: No Name element");
   }
@@ -55,27 +55,27 @@ IMDDimension_sptr createDimension(const Poco::XML::Element &dimensionXML) {
 
   Poco::XML::Element *unitsElement = dimensionXML.getChildElement("Units");
   std::string units = "None";
-  if (NULL != unitsElement) {
+  if (nullptr != unitsElement) {
     // Set units if they exist.
     units = unitsElement->innerText();
   }
 
   Poco::XML::Element *frameElement = dimensionXML.getChildElement("Frame");
   std::string frame = "Unknown frame";
-  if (NULL != frameElement) {
+  if (nullptr != frameElement) {
     // Set the frame if it exists
     frame = frameElement->innerText();
   }
 
   Poco::XML::Element *upperBoundsElement =
       dimensionXML.getChildElement("UpperBounds");
-  if (NULL == upperBoundsElement) {
+  if (nullptr == upperBoundsElement) {
     throw std::invalid_argument(
         "Invalid string passed to createDimension: No UpperBounds element");
   }
   Poco::XML::Element *lowerBoundsElement =
       dimensionXML.getChildElement("LowerBounds");
-  if (NULL == lowerBoundsElement) {
+  if (nullptr == lowerBoundsElement) {
     throw std::invalid_argument(
         "Invalid string passed to createDimension: No LowerBounds element");
   }
@@ -93,7 +93,7 @@ IMDDimension_sptr createDimension(const Poco::XML::Element &dimensionXML) {
 
   Poco::XML::Element *numBinsElement =
       dimensionXML.getChildElement("NumberOfBins");
-  if (NULL == numBinsElement) {
+  if (nullptr == numBinsElement) {
     throw std::invalid_argument(
         "Invalid string passed to createDimension: No NumberOfBins element");
   }
@@ -107,7 +107,7 @@ IMDDimension_sptr createDimension(const Poco::XML::Element &dimensionXML) {
 
   Poco::XML::Element *integrationXML =
       dimensionXML.getChildElement("Integrated");
-  if (NULL != integrationXML) {
+  if (nullptr != integrationXML) {
     double upperLimit = atof(
         integrationXML->getChildElement("UpperLimit")->innerText().c_str());
     double lowerLimit = atof(
diff --git a/Framework/Geometry/src/MDGeometry/MDGeometryXMLBuilder.cpp b/Framework/Geometry/src/MDGeometry/MDGeometryXMLBuilder.cpp
index ff15b1395b13c0e63ec323f1addf80203a4483b7..c5aa3024884fd6df9ce178fca21a932e3d3b1e59 100644
--- a/Framework/Geometry/src/MDGeometry/MDGeometryXMLBuilder.cpp
+++ b/Framework/Geometry/src/MDGeometry/MDGeometryXMLBuilder.cpp
@@ -44,7 +44,7 @@ template <typename CheckDimensionPolicy>
 bool MDGeometryBuilderXML<CheckDimensionPolicy>::addOrdinaryDimension(
     IMDDimension_const_sptr dimensionToAdd) const {
   bool bAdded = false; // Addition fails by default.
-  if (dimensionToAdd.get() != NULL) {
+  if (dimensionToAdd.get() != nullptr) {
     CompareIMDDimension_const_sptr comparitor(dimensionToAdd);
     auto location = std::find_if(m_vecDimensions.begin(), m_vecDimensions.end(),
                                  comparitor);
@@ -119,7 +119,7 @@ bool MDGeometryBuilderXML<CheckDimensionPolicy>::addXDimension(
     IMDDimension_const_sptr dimension) const {
 
   bool bAdded = false;
-  if (dimension.get() != NULL) {
+  if (dimension.get() != nullptr) {
     applyPolicyChecking(dimension);
     addOrdinaryDimension(dimension);
     m_spXDimension = dimension;
@@ -139,7 +139,7 @@ bool MDGeometryBuilderXML<CheckDimensionPolicy>::addYDimension(
     IMDDimension_const_sptr dimension) const {
 
   bool bAdded = false;
-  if (dimension.get() != NULL) {
+  if (dimension.get() != nullptr) {
     applyPolicyChecking(dimension);
     addOrdinaryDimension(dimension);
     m_spYDimension = dimension;
@@ -158,7 +158,7 @@ template <typename CheckDimensionPolicy>
 bool MDGeometryBuilderXML<CheckDimensionPolicy>::addZDimension(
     IMDDimension_const_sptr dimension) const {
   bool bAdded = false;
-  if (dimension.get() != NULL) {
+  if (dimension.get() != nullptr) {
     applyPolicyChecking(dimension);
     addOrdinaryDimension(dimension);
     m_spZDimension = dimension;
@@ -178,7 +178,7 @@ bool MDGeometryBuilderXML<CheckDimensionPolicy>::addTDimension(
     IMDDimension_const_sptr dimension) const {
 
   bool bAdded = false;
-  if (dimension.get() != NULL) {
+  if (dimension.get() != nullptr) {
     applyPolicyChecking(dimension);
     addOrdinaryDimension(dimension);
     m_spTDimension = dimension;
@@ -273,22 +273,22 @@ const std::string &MDGeometryBuilderXML<CheckDimensionPolicy>::create() const {
 
 template <typename CheckDimensionPolicy>
 bool MDGeometryBuilderXML<CheckDimensionPolicy>::hasXDimension() const {
-  return NULL != this->m_spXDimension.get();
+  return nullptr != this->m_spXDimension.get();
 }
 
 template <typename CheckDimensionPolicy>
 bool MDGeometryBuilderXML<CheckDimensionPolicy>::hasYDimension() const {
-  return NULL != this->m_spYDimension.get();
+  return nullptr != this->m_spYDimension.get();
 }
 
 template <typename CheckDimensionPolicy>
 bool MDGeometryBuilderXML<CheckDimensionPolicy>::hasZDimension() const {
-  return NULL != this->m_spZDimension.get();
+  return nullptr != this->m_spZDimension.get();
 }
 
 template <typename CheckDimensionPolicy>
 bool MDGeometryBuilderXML<CheckDimensionPolicy>::hasTDimension() const {
-  return NULL != this->m_spTDimension.get();
+  return nullptr != this->m_spTDimension.get();
 }
 
 template <typename CheckDimensionPolicy>
diff --git a/Framework/Geometry/src/MDGeometry/MDGeometryXMLParser.cpp b/Framework/Geometry/src/MDGeometry/MDGeometryXMLParser.cpp
index 64793e5f038ca9f0f779badf4cac179d36f8b086..23d43cdecd5f73d6b9b2d995abee9897cee42880 100644
--- a/Framework/Geometry/src/MDGeometry/MDGeometryXMLParser.cpp
+++ b/Framework/Geometry/src/MDGeometry/MDGeometryXMLParser.cpp
@@ -51,11 +51,11 @@ void MDGeometryXMLParser::execute() {
   Poco::AutoPtr<Poco::XML::Document> pDoc = pParser.parseString(m_xmlToProcess);
   Poco::XML::Element *pRootElem = pDoc->documentElement();
   // Apply root node checking if supplied.
-  Poco::XML::Element *geometryXMLElement = NULL;
+  Poco::XML::Element *geometryXMLElement = nullptr;
   if (!m_rootNodeName.empty()) {
     Poco::XML::Element *temp = pRootElem->getChildElement(m_rootNodeName);
     geometryXMLElement = temp;
-    if (geometryXMLElement == NULL) {
+    if (geometryXMLElement == nullptr) {
       std::string message =
           "Root node was not found to be the expected value of " +
           m_rootNodeName;
@@ -266,7 +266,7 @@ MDGeometryXMLParser::getAllDimensions() const {
 */
 bool MDGeometryXMLParser::hasXDimension() const {
   validate();
-  return NULL != m_xDimension.get();
+  return nullptr != m_xDimension.get();
 }
 
 /**
@@ -275,7 +275,7 @@ bool MDGeometryXMLParser::hasXDimension() const {
 */
 bool MDGeometryXMLParser::hasYDimension() const {
   validate();
-  return NULL != m_yDimension.get();
+  return nullptr != m_yDimension.get();
 }
 
 /**
@@ -284,7 +284,7 @@ bool MDGeometryXMLParser::hasYDimension() const {
 */
 bool MDGeometryXMLParser::hasZDimension() const {
   validate();
-  return NULL != m_zDimension.get();
+  return nullptr != m_zDimension.get();
 }
 
 /**
@@ -293,7 +293,7 @@ bool MDGeometryXMLParser::hasZDimension() const {
 */
 bool MDGeometryXMLParser::hasTDimension() const {
   validate();
-  return NULL != m_tDimension.get();
+  return nullptr != m_tDimension.get();
 }
 
 /**
diff --git a/Framework/Geometry/src/Math/Acomp.cpp b/Framework/Geometry/src/Math/Acomp.cpp
index 0ea4f61ad130c7bfb0b37885501939cff7ab9168..c6f1c2ea9d6871a4b0e84e3df5dadff2deda407e 100644
--- a/Framework/Geometry/src/Math/Acomp.cpp
+++ b/Framework/Geometry/src/Math/Acomp.cpp
@@ -1554,7 +1554,7 @@ Assessor function to get a Comp points
 */
 {
   if (Index < 0 || Index >= static_cast<int>(Comp.size()))
-    return 0;
+    return nullptr;
   return &Comp[Index];
 }
 
diff --git a/Framework/Geometry/src/Objects/Object.cpp b/Framework/Geometry/src/Objects/Object.cpp
index 91420767786fe15a6e0dd2e3451ebcae2f62cb73..4d8dfd1f894b030c3eb9c3ae1fc0bb6fbfa7da5d 100644
--- a/Framework/Geometry/src/Objects/Object.cpp
+++ b/Framework/Geometry/src/Objects/Object.cpp
@@ -61,7 +61,7 @@ Object::Object(const std::string &shapeXML)
 * @param A :: The object to initialise this copy from
 */
 Object::Object(const Object &A)
-    : ObjName(A.ObjName), TopRule((A.TopRule) ? A.TopRule->clone() : NULL),
+    : ObjName(A.ObjName), TopRule((A.TopRule) ? A.TopRule->clone() : nullptr),
       m_boundingBox(A.m_boundingBox), AABBxMax(A.AABBxMax),
       AABByMax(A.AABByMax), AABBzMax(A.AABBzMax), AABBxMin(A.AABBxMin),
       AABByMin(A.AABByMin), AABBzMin(A.AABBzMin), boolBounded(A.boolBounded),
@@ -80,7 +80,7 @@ Object::Object(const Object &A)
 Object &Object::operator=(const Object &A) {
   if (this != &A) {
     ObjName = A.ObjName;
-    TopRule = (A.TopRule) ? A.TopRule->clone() : 0;
+    TopRule = (A.TopRule) ? A.TopRule->clone() : nullptr;
     AABBxMax = A.AABBxMax;
     AABByMax = A.AABByMax;
     AABBzMax = A.AABBzMax;
@@ -126,7 +126,7 @@ const Kernel::Material &Object::material() const { return m_material; }
 */
 bool Object::hasValidShape() const {
   // Assume invalid shape if object has no 'TopRule' or surfaces
-  return (TopRule != NULL && !SurList.empty());
+  return (TopRule != nullptr && !SurList.empty());
 }
 
 /**
@@ -668,7 +668,7 @@ void Object::write(std::ostream &OX) const {
 * @returns 1 on success
 */
 int Object::procString(const std::string &Line) {
-  TopRule = 0;
+  TopRule = nullptr;
   std::map<int, std::unique_ptr<Rule>> RuleList; // List for the rules
   int Ridx = 0; // Current index (not necessary size of RuleList
   // SURFACE REPLACEMENT
@@ -1835,7 +1835,7 @@ int Object::searchForObject(Kernel::V3D &point) const {
 * the calling function.
 */
 void Object::setGeometryHandler(boost::shared_ptr<GeometryHandler> h) {
-  if (h == NULL)
+  if (h == nullptr)
     return;
   handle = h;
 }
@@ -1845,7 +1845,7 @@ void Object::setGeometryHandler(boost::shared_ptr<GeometryHandler> h) {
 * function does nothing.
 */
 void Object::draw() const {
-  if (handle == NULL)
+  if (handle == nullptr)
     return;
   // Render the Object
   handle->Render();
@@ -1857,7 +1857,7 @@ void Object::draw() const {
 * If the handler is not set then this function does nothing.
 */
 void Object::initDraw() const {
-  if (handle == NULL)
+  if (handle == nullptr)
     return;
   // Render the Object
   handle->Initialize();
@@ -1897,16 +1897,16 @@ void Object::updateGeometryHandler() {
     return;
   bGeometryCaching = true;
   // Check if the Geometry handler can be handled for cache
-  if (handle == NULL)
+  if (handle == nullptr)
     return;
   if (!handle->canTriangulate())
     return;
   // Check if the reader exist then read the cache
-  if (vtkCacheReader.get() != NULL) {
+  if (vtkCacheReader.get() != nullptr) {
     vtkCacheReader->readCacheForObject(this);
   }
   // Check if the writer exist then write the cache
-  if (vtkCacheWriter.get() != NULL) {
+  if (vtkCacheWriter.get() != nullptr) {
     vtkCacheWriter->addObject(this);
   }
 }
@@ -1918,7 +1918,7 @@ void Object::updateGeometryHandler() {
 * @return the number of triangles
 */
 int Object::NumberOfTriangles() const {
-  if (handle == NULL)
+  if (handle == nullptr)
     return 0;
   return handle->NumberOfTriangles();
 }
@@ -1927,7 +1927,7 @@ int Object::NumberOfTriangles() const {
 * get number of points
 */
 int Object::NumberOfPoints() const {
-  if (handle == NULL)
+  if (handle == nullptr)
     return 0;
   return handle->NumberOfPoints();
 }
@@ -1936,8 +1936,8 @@ int Object::NumberOfPoints() const {
 * get vertices
 */
 double *Object::getTriangleVertices() const {
-  if (handle == NULL)
-    return NULL;
+  if (handle == nullptr)
+    return nullptr;
   return handle->getTriangleVertices();
 }
 
@@ -1945,8 +1945,8 @@ double *Object::getTriangleVertices() const {
 * get faces
 */
 int *Object::getTriangleFaces() const {
-  if (handle == NULL)
-    return NULL;
+  if (handle == nullptr)
+    return nullptr;
   return handle->getTriangleFaces();
 }
 
@@ -1956,7 +1956,7 @@ int *Object::getTriangleFaces() const {
 void Object::GetObjectGeom(int &type, std::vector<Kernel::V3D> &vectors,
                            double &myradius, double &myheight) const {
   type = 0;
-  if (handle == NULL)
+  if (handle == nullptr)
     return;
   handle->GetObjectGeom(type, vectors, myradius, myheight);
 }
diff --git a/Framework/Geometry/src/Objects/RuleItems.cpp b/Framework/Geometry/src/Objects/RuleItems.cpp
index 7b7f4ff451799acba2659845f5234a1e3e17a682..bba20e95262c6decff7a407c3c92c78d29c6dd19 100644
--- a/Framework/Geometry/src/Objects/RuleItems.cpp
+++ b/Framework/Geometry/src/Objects/RuleItems.cpp
@@ -232,10 +232,10 @@ Rule *Intersection::findKey(const int KeyN)
   @retval Rule* if an appropiate leaf is found
 */
 {
-  Rule *PtrOut = (A) ? A->findKey(KeyN) : 0;
+  Rule *PtrOut = (A) ? A->findKey(KeyN) : nullptr;
   if (PtrOut)
     return PtrOut;
-  return (B) ? B->findKey(KeyN) : 0;
+  return (B) ? B->findKey(KeyN) : nullptr;
 }
 
 std::string Intersection::display() const
@@ -534,10 +534,10 @@ Rule *Union::findKey(const int KeyN)
 */
 {
 
-  Rule *PtrOut = (A) ? A->findKey(KeyN) : 0;
+  Rule *PtrOut = (A) ? A->findKey(KeyN) : nullptr;
   if (PtrOut)
     return PtrOut;
-  return (B) ? B->findKey(KeyN) : 0;
+  return (B) ? B->findKey(KeyN) : nullptr;
 }
 
 int Union::isComplementary() const
@@ -758,7 +758,7 @@ Rule *SurfPoint::findKey(const int KeyNum)
   @retval Rule* if an appropiate leaf is found
 */
 {
-  return (KeyNum == keyN) ? this : 0;
+  return (KeyNum == keyN) ? this : nullptr;
 }
 
 void SurfPoint::setKeyN(const int Ky)
@@ -971,7 +971,7 @@ TopoDS_Shape SurfPoint::analyze() {
 //----------------------------------------
 
 CompObj::CompObj()
-    : Rule(), objN(0), key(0)
+    : Rule(), objN(0), key(nullptr)
 /**
   Constructor
 */
@@ -1079,7 +1079,7 @@ Rule *CompObj::findKey(const int i)
 */
 {
   (void)i; // Avoid compiler warning
-  return 0;
+  return nullptr;
 }
 
 int CompObj::findLeaf(const Rule *A) const
@@ -1536,7 +1536,7 @@ Rule *CompGrp::findKey(const int i)
 */
 {
   (void)i; // Avoid compiler warning
-  return 0;
+  return nullptr;
 }
 
 int CompGrp::findLeaf(const Rule *R) const
diff --git a/Framework/Geometry/src/Objects/Rules.cpp b/Framework/Geometry/src/Objects/Rules.cpp
index c94bd9f171b04b2d1cd09d7681d2d26d31e1657e..1b14e4c9aff2a51098940ba0b1036f62e76c9a79 100644
--- a/Framework/Geometry/src/Objects/Rules.cpp
+++ b/Framework/Geometry/src/Objects/Rules.cpp
@@ -76,7 +76,7 @@ int Rule::removeComplementary(std::unique_ptr<Rule> &TopRule)
   while (active) {
     active = 0;
     std::stack<DTriple<Rule *, int, Rule *>> TreeLine; // Tree stack of rules
-    TreeLine.push(DTriple<Rule *, int, Rule *>(0, 0, TopRule.get()));
+    TreeLine.push(DTriple<Rule *, int, Rule *>(nullptr, 0, TopRule.get()));
 
     while (!active && !TreeLine.empty()) // need to exit on active
     {
@@ -111,11 +111,11 @@ int Rule::removeComplementary(std::unique_ptr<Rule> &TopRule)
           if (TreeComp.first) {
             TreeComp.first = tmpA->leaf(0);
             // delete tmpA
-            tmpA->setLeaf(0, 0);
+            tmpA->setLeaf(nullptr, 0);
             Rule *parentOfA = tmpA->getParent();
             if (parentOfA) {
               int leafNumber = parentOfA->findLeaf(tmpA);
-              parentOfA->setLeaf(NULL, leafNumber);
+              parentOfA->setLeaf(nullptr, leafNumber);
             }
           }
         }
@@ -174,7 +174,7 @@ int Rule::makeCNFcopy(std::unique_ptr<Rule> &TopRule)
 
     // Start by putting the top item on the Tree Stack.
     // Note that it doesn't have a parent.
-    TreeLine.push(DTriple<Rule *, int, Rule *>(0, 0, TopRule.get()));
+    TreeLine.push(DTriple<Rule *, int, Rule *>(nullptr, 0, TopRule.get()));
 
     // Exit condition is that nothing changed last time
     // or the tree is Empty.
@@ -218,8 +218,8 @@ int Rule::makeCNFcopy(std::unique_ptr<Rule> &TopRule)
               -1) // ok the LHS is a union. (a ^ b) v g ==> (a v g) ^ (b v g )
           {
             // Make copies of the Unions leaves (allowing for null union)
-            alpha = (tmpB->leaf(0)) ? tmpB->leaf(0)->clone() : 0;
-            beta = (tmpB->leaf(1)) ? tmpB->leaf(1)->clone() : 0;
+            alpha = (tmpB->leaf(0)) ? tmpB->leaf(0)->clone() : nullptr;
+            beta = (tmpB->leaf(1)) ? tmpB->leaf(1)->clone() : nullptr;
             gamma = tmpC->clone();
           } else // RHS a v (b ^ g) ==> (a v b) ^ (a v g )
           {
@@ -227,8 +227,8 @@ int Rule::makeCNFcopy(std::unique_ptr<Rule> &TopRule)
             // Note :: alpha designated as beta , gamma plays the role of alpha
             // in the RHS part of the above equation (allows common replace
             // block below.
-            alpha = (tmpC->leaf(0)) ? tmpC->leaf(0)->clone() : 0;
-            beta = (tmpC->leaf(1)) ? tmpC->leaf(1)->clone() : 0;
+            alpha = (tmpC->leaf(0)) ? tmpC->leaf(0)->clone() : nullptr;
+            beta = (tmpC->leaf(1)) ? tmpC->leaf(1)->clone() : nullptr;
             gamma = tmpB->clone();
           }
           // Have bit to replace
@@ -398,7 +398,7 @@ int Rule::removeItem(std::unique_ptr<Rule> &TRule, const int SurfN)
   Rule *Ptr = TRule->findKey(SurfN);
   while (Ptr) {
     Rule *LevelOne = Ptr->getParent(); // Must work
-    Rule *LevelTwo = (LevelOne) ? LevelOne->getParent() : 0;
+    Rule *LevelTwo = (LevelOne) ? LevelOne->getParent() : nullptr;
 
     if (LevelTwo) /// Not the top level
     {
@@ -414,7 +414,7 @@ int Rule::removeItem(std::unique_ptr<Rule> &TRule, const int SurfN)
       Rule *PObj =
           (LevelOne->leaf(0) != Ptr) ? LevelOne->leaf(0) : LevelOne->leaf(1);
 
-      PObj->setParent(0); /// New Top rule
+      PObj->setParent(nullptr); /// New Top rule
       TRule = PObj->clone();
     } else // Basic surf object
     {
@@ -433,14 +433,14 @@ int Rule::removeItem(std::unique_ptr<Rule> &TRule, const int SurfN)
 }
 
 Rule::Rule()
-    : Parent(0)
+    : Parent(nullptr)
 /**
   Standard Constructor
 */
 {}
 
 Rule::Rule(const Rule &)
-    : Parent(0)
+    : Parent(nullptr)
 /**
   Constructor copies.
   Parent set to 0
diff --git a/Framework/Geometry/src/Objects/ShapeFactory.cpp b/Framework/Geometry/src/Objects/ShapeFactory.cpp
index 69e7181d95a3d1e99f9545854de88ac3f2f23aa6..a28a9bea6392357a3cc226173de3b39e39098e5c 100644
--- a/Framework/Geometry/src/Objects/ShapeFactory.cpp
+++ b/Framework/Geometry/src/Objects/ShapeFactory.cpp
@@ -148,7 +148,7 @@ boost::shared_ptr<Object> ShapeFactory::createShape(Poco::XML::Element *pElem) {
   int l_id = 1; // used to build up unique id's for each shape added. Must start
                 // from int > zero.
 
-  Element *lastElement = NULL; // This is to store element for the fixed
+  Element *lastElement = nullptr; // This is to store element for the fixed
                                // complete objects such as sphere,cone,cylinder
                                // and cuboid
   for (unsigned int i = 0; i < pNL_length; i++) {
@@ -279,7 +279,7 @@ boost::shared_ptr<Object> ShapeFactory::createShape(Poco::XML::Element *pElem) {
     retVal->setObject(21, algebraFromUser);
     retVal->populate(primitives);
     // check whether there is only one surface/closed surface
-    if (numPrimitives == 1 && lastElement != NULL) // special case
+    if (numPrimitives == 1 && lastElement != nullptr) // special case
     {
       // parse the primitive and create a Geometry handler for the object
       createGeometryHandler(lastElement, retVal);
@@ -1199,7 +1199,7 @@ ShapeFactory::getOptionalShapeElement(Poco::XML::Element *pElem,
   // Allow zero or one occurances of subelements with the given name.
   Poco::AutoPtr<NodeList> pNL = pElem->getElementsByTagName(name);
   if (pNL->length() == 0)
-    return NULL;
+    return nullptr;
   else if (pNL->length() > 1)
     throw std::invalid_argument(
         "XML element: <" + pElem->tagName() +
diff --git a/Framework/Geometry/src/Rendering/BitmapGeometryHandler.cpp b/Framework/Geometry/src/Rendering/BitmapGeometryHandler.cpp
index 6b7e298ba75f5d93b576fa5a1b4c546b06dcaf7e..473269de7dd54745f10e5254922da1ab67a52be7 100644
--- a/Framework/Geometry/src/Rendering/BitmapGeometryHandler.cpp
+++ b/Framework/Geometry/src/Rendering/BitmapGeometryHandler.cpp
@@ -25,7 +25,7 @@ BitmapGeometryHandler::BitmapGeometryHandler(RectangularDetector *comp)
 }
 
 BitmapGeometryHandler::BitmapGeometryHandler()
-    : GeometryHandler((Object *)NULL), m_rectDet(NULL) {}
+    : GeometryHandler((Object *)nullptr), m_rectDet(nullptr) {}
 
 /// Destructor
 BitmapGeometryHandler::~BitmapGeometryHandler() {}
diff --git a/Framework/Geometry/src/Rendering/CacheGeometryGenerator.cpp b/Framework/Geometry/src/Rendering/CacheGeometryGenerator.cpp
index dcb1b8b6c9a8e46d585e4a5f0393472ff7fe03b9..6038a712b7b912dc396238f72d22a9f105276bab 100644
--- a/Framework/Geometry/src/Rendering/CacheGeometryGenerator.cpp
+++ b/Framework/Geometry/src/Rendering/CacheGeometryGenerator.cpp
@@ -19,8 +19,8 @@ namespace Geometry {
 CacheGeometryGenerator::CacheGeometryGenerator(Object *obj) : Obj(obj) {
   mNoOfVertices = 0;
   mNoOfTriangles = 0;
-  mFaces = NULL;
-  mPoints = NULL;
+  mFaces = nullptr;
+  mPoints = nullptr;
 }
 
 /**
@@ -45,9 +45,9 @@ void CacheGeometryGenerator::Generate() {
  * Destroy the surface generated for the object
  */
 CacheGeometryGenerator::~CacheGeometryGenerator() {
-  if (mFaces != NULL)
+  if (mFaces != nullptr)
     delete[] mFaces;
-  if (mPoints != NULL)
+  if (mPoints != nullptr)
     delete[] mPoints;
 }
 
@@ -68,9 +68,9 @@ int *CacheGeometryGenerator::getTriangleFaces() { return mFaces; }
 */
 void CacheGeometryGenerator::setGeometryCache(int noPts, int noFaces,
                                               double *pts, int *faces) {
-  if (mPoints != NULL)
+  if (mPoints != nullptr)
     delete[] mPoints;
-  if (mFaces != NULL)
+  if (mFaces != nullptr)
     delete[] mFaces;
   mNoOfVertices = noPts;
   mNoOfTriangles = noFaces;
diff --git a/Framework/Geometry/src/Rendering/CacheGeometryHandler.cpp b/Framework/Geometry/src/Rendering/CacheGeometryHandler.cpp
index 6c3948ce7ad94f1aab187610729fcf3a4debd06c..52fbc651ed6f74a94c46fba23d9012bed8fa4815 100644
--- a/Framework/Geometry/src/Rendering/CacheGeometryHandler.cpp
+++ b/Framework/Geometry/src/Rendering/CacheGeometryHandler.cpp
@@ -12,7 +12,7 @@ namespace Geometry {
 
 CacheGeometryHandler::CacheGeometryHandler(IObjComponent *comp)
     : GeometryHandler(comp) {
-  Triangulator = NULL;
+  Triangulator = nullptr;
   Renderer = new CacheGeometryRenderer();
 }
 
@@ -33,14 +33,14 @@ boost::shared_ptr<GeometryHandler> CacheGeometryHandler::clone() const {
   if (this->Triangulator)
     clone->Triangulator = new CacheGeometryGenerator(this->Obj);
   else
-    clone->Triangulator = NULL;
+    clone->Triangulator = nullptr;
   return clone;
 }
 
 CacheGeometryHandler::~CacheGeometryHandler() {
-  if (Triangulator != NULL)
+  if (Triangulator != nullptr)
     delete Triangulator;
-  if (Renderer != NULL)
+  if (Renderer != nullptr)
     delete Renderer;
 }
 
@@ -60,39 +60,39 @@ GeometryHandler *CacheGeometryHandler::createInstance(Object *obj) {
 void CacheGeometryHandler::Triangulate() {
   // Check whether Object is triangulated otherwise triangulate
   PARALLEL_CRITICAL(Triangulate)
-  if (Obj != NULL && !boolTriangulated) {
+  if (Obj != nullptr && !boolTriangulated) {
     Triangulator->Generate();
     boolTriangulated = true;
   }
 }
 
 void CacheGeometryHandler::Render() {
-  if (Obj != NULL) {
+  if (Obj != nullptr) {
     if (boolTriangulated == false)
       Triangulate();
     Renderer->Render(
         Triangulator->getNumberOfPoints(), Triangulator->getNumberOfTriangles(),
         Triangulator->getTriangleVertices(), Triangulator->getTriangleFaces());
-  } else if (ObjComp != NULL) {
+  } else if (ObjComp != nullptr) {
     Renderer->Render(ObjComp);
   }
 }
 
 void CacheGeometryHandler::Initialize() {
-  if (Obj != NULL) {
+  if (Obj != nullptr) {
     Obj->updateGeometryHandler();
     if (boolTriangulated == false)
       Triangulate();
     Renderer->Initialize(
         Triangulator->getNumberOfPoints(), Triangulator->getNumberOfTriangles(),
         Triangulator->getTriangleVertices(), Triangulator->getTriangleFaces());
-  } else if (ObjComp != NULL) {
+  } else if (ObjComp != nullptr) {
     Renderer->Initialize(ObjComp);
   }
 }
 
 int CacheGeometryHandler::NumberOfTriangles() {
-  if (Obj != NULL) {
+  if (Obj != nullptr) {
     Obj->updateGeometryHandler();
     if (boolTriangulated == false)
       Triangulate();
@@ -103,7 +103,7 @@ int CacheGeometryHandler::NumberOfTriangles() {
 }
 
 int CacheGeometryHandler::NumberOfPoints() {
-  if (Obj != NULL) {
+  if (Obj != nullptr) {
     Obj->updateGeometryHandler();
     if (boolTriangulated == false)
       Triangulate();
@@ -114,24 +114,24 @@ int CacheGeometryHandler::NumberOfPoints() {
 }
 
 double *CacheGeometryHandler::getTriangleVertices() {
-  if (Obj != NULL) {
+  if (Obj != nullptr) {
     Obj->updateGeometryHandler();
     if (boolTriangulated == false)
       Triangulate();
     return Triangulator->getTriangleVertices();
   } else {
-    return NULL;
+    return nullptr;
   }
 }
 
 int *CacheGeometryHandler::getTriangleFaces() {
-  if (Obj != NULL) {
+  if (Obj != nullptr) {
     Obj->updateGeometryHandler();
     if (boolTriangulated == false)
       Triangulate();
     return Triangulator->getTriangleFaces();
   } else {
-    return NULL;
+    return nullptr;
   }
 }
 
diff --git a/Framework/Geometry/src/Rendering/GeometryHandler.cpp b/Framework/Geometry/src/Rendering/GeometryHandler.cpp
index 21623e2739bfdfb8f6d02230d3b6e3ccf50562f1..75b3d9215f999a2f2f0af8e3069ddbb525d80735 100644
--- a/Framework/Geometry/src/Rendering/GeometryHandler.cpp
+++ b/Framework/Geometry/src/Rendering/GeometryHandler.cpp
@@ -19,7 +19,7 @@ GeometryHandler::GeometryHandler(IObjComponent *comp) : Obj() {
  */
 GeometryHandler::GeometryHandler(boost::shared_ptr<Object> obj)
     : Obj(obj.get()) {
-  ObjComp = NULL;
+  ObjComp = nullptr;
   boolTriangulated = false;
   boolIsInitialized = false;
 }
@@ -29,12 +29,12 @@ GeometryHandler::GeometryHandler(boost::shared_ptr<Object> obj)
  *  This geometry handler will be Object's geometry handler
  */
 GeometryHandler::GeometryHandler(Object *obj) : Obj(obj) {
-  ObjComp = NULL;
+  ObjComp = nullptr;
   boolTriangulated = false;
   boolIsInitialized = false;
 }
 
 /// Destructor
-GeometryHandler::~GeometryHandler() { ObjComp = NULL; }
+GeometryHandler::~GeometryHandler() { ObjComp = nullptr; }
 }
 }
diff --git a/Framework/Geometry/src/Rendering/GluGeometryHandler.cpp b/Framework/Geometry/src/Rendering/GluGeometryHandler.cpp
index 18afc9da75f45d87cd6b874bd2896eed8b82d99c..23fc745b7c7c1ed1fdbfe9d32594bef3c537aadc 100644
--- a/Framework/Geometry/src/Rendering/GluGeometryHandler.cpp
+++ b/Framework/Geometry/src/Rendering/GluGeometryHandler.cpp
@@ -32,7 +32,7 @@ boost::shared_ptr<GeometryHandler> GluGeometryHandler::clone() const {
 }
 
 GluGeometryHandler::~GluGeometryHandler() {
-  if (Renderer != NULL)
+  if (Renderer != nullptr)
     delete Renderer;
 }
 
@@ -56,7 +56,7 @@ void GluGeometryHandler::Triangulate() {
 }
 
 void GluGeometryHandler::Render() {
-  if (Obj != NULL) {
+  if (Obj != nullptr) {
     switch (type) {
     case CUBOID:
       (dynamic_cast<GluGeometryRenderer *>(Renderer))
@@ -79,7 +79,7 @@ void GluGeometryHandler::Render() {
           ->RenderSegmentedCylinder(center, axis, radius, height);
       break;
     }
-  } else if (ObjComp != NULL) {
+  } else if (ObjComp != nullptr) {
     Renderer->Render(ObjComp);
   }
 }
@@ -88,7 +88,7 @@ void GluGeometryHandler::GetObjectGeom(int &mytype,
                                        std::vector<Kernel::V3D> &vectors,
                                        double &myradius, double &myheight) {
   mytype = 0;
-  if (Obj != NULL) {
+  if (Obj != nullptr) {
     switch (type) {
     case CUBOID:
       mytype = 1;
@@ -128,7 +128,7 @@ void GluGeometryHandler::GetObjectGeom(int &mytype,
 }
 
 void GluGeometryHandler::Initialize() {
-  if (Obj != NULL) {
+  if (Obj != nullptr) {
     // There is no initialization or probably call render
     Render();
   }
diff --git a/Framework/Geometry/src/Rendering/OCGeometryGenerator.cpp b/Framework/Geometry/src/Rendering/OCGeometryGenerator.cpp
index 35768fab559b414d5d2a572c56346b8b4dbec993..52817635eaa470fe2e1fc1d94a7c9e8a4d1a3bf9 100644
--- a/Framework/Geometry/src/Rendering/OCGeometryGenerator.cpp
+++ b/Framework/Geometry/src/Rendering/OCGeometryGenerator.cpp
@@ -78,14 +78,14 @@ Kernel::Logger g_log("OCGeometryGenerator");
 * @param obj :: input object
 */
 OCGeometryGenerator::OCGeometryGenerator(const Object *obj) : Obj(obj) {
-  ObjSurface = NULL;
+  ObjSurface = nullptr;
 }
 
 /**
 * Generate geometry, it uses OpenCascade to generate surface triangles.
 */
 void OCGeometryGenerator::Generate() {
-  if (ObjSurface == NULL) {
+  if (ObjSurface == nullptr) {
     AnalyzeObject();
   }
 }
@@ -94,7 +94,7 @@ void OCGeometryGenerator::Generate() {
 * Destroy the surface generated for the object
 */
 OCGeometryGenerator::~OCGeometryGenerator() {
-  if (ObjSurface != NULL) {
+  if (ObjSurface != nullptr) {
     delete ObjSurface;
   }
 }
@@ -103,11 +103,11 @@ OCGeometryGenerator::~OCGeometryGenerator() {
 * Analyzes the rule tree in object and creates a Topology Shape
 */
 void OCGeometryGenerator::AnalyzeObject() {
-  if (Obj != NULL) // If object exists
+  if (Obj != nullptr) // If object exists
   {
     // Get the top rule tree in Obj
     const Rule *top = Obj->topRule();
-    if (top == NULL) {
+    if (top == nullptr) {
       ObjSurface = new TopoDS_Shape();
       return;
     }
@@ -129,7 +129,7 @@ TopoDS_Shape *OCGeometryGenerator::getObjectSurface() { return ObjSurface; }
 
 int OCGeometryGenerator::getNumberOfTriangles() {
   int countFace = 0;
-  if (ObjSurface != NULL) {
+  if (ObjSurface != nullptr) {
     TopExp_Explorer Ex;
     for (Ex.Init(*ObjSurface, TopAbs_FACE); Ex.More(); Ex.Next()) {
       TopoDS_Face F = TopoDS::Face(Ex.Current());
@@ -143,7 +143,7 @@ int OCGeometryGenerator::getNumberOfTriangles() {
 
 int OCGeometryGenerator::getNumberOfPoints() {
   int countVert = 0;
-  if (ObjSurface != NULL) {
+  if (ObjSurface != nullptr) {
     TopExp_Explorer Ex;
     for (Ex.Init(*ObjSurface, TopAbs_FACE); Ex.More(); Ex.Next()) {
       TopoDS_Face F = TopoDS::Face(Ex.Current());
@@ -156,7 +156,7 @@ int OCGeometryGenerator::getNumberOfPoints() {
 }
 
 double *OCGeometryGenerator::getTriangleVertices() {
-  double *points = NULL;
+  double *points = nullptr;
   int nPts = this->getNumberOfPoints();
   if (nPts > 0) {
     points = new double[static_cast<std::size_t>(nPts) * 3];
@@ -181,7 +181,7 @@ double *OCGeometryGenerator::getTriangleVertices() {
 }
 
 int *OCGeometryGenerator::getTriangleFaces() {
-  int *faces = NULL;
+  int *faces = nullptr;
   int nFaces = this->getNumberOfTriangles(); // was Points
   if (nFaces > 0) {
     faces = new int[static_cast<std::size_t>(nFaces) * 3];
diff --git a/Framework/Geometry/src/Rendering/OCGeometryHandler.cpp b/Framework/Geometry/src/Rendering/OCGeometryHandler.cpp
index b82c21c7abef491be78eef9b1ad56850ff13c521..47bfdf14894d4a4fdb2642c20da408ccafab5d90 100644
--- a/Framework/Geometry/src/Rendering/OCGeometryHandler.cpp
+++ b/Framework/Geometry/src/Rendering/OCGeometryHandler.cpp
@@ -11,7 +11,7 @@ namespace Mantid {
 namespace Geometry {
 OCGeometryHandler::OCGeometryHandler(IObjComponent *comp)
     : GeometryHandler(comp) {
-  Triangulator = NULL;
+  Triangulator = nullptr;
   Renderer = new OCGeometryRenderer();
 }
 
@@ -35,9 +35,9 @@ boost::shared_ptr<GeometryHandler> OCGeometryHandler::clone() const {
 }
 
 OCGeometryHandler::~OCGeometryHandler() {
-  if (Triangulator != NULL)
+  if (Triangulator != nullptr)
     delete Triangulator;
-  if (Renderer != NULL)
+  if (Renderer != nullptr)
     delete Renderer;
 }
 
@@ -56,34 +56,34 @@ GeometryHandler *OCGeometryHandler::createInstance(Object *obj) {
 
 void OCGeometryHandler::Triangulate() {
   // Check whether Object is triangulated otherwise triangulate
-  if (Obj != NULL && !boolTriangulated) {
+  if (Obj != nullptr && !boolTriangulated) {
     Triangulator->Generate();
     boolTriangulated = true;
   }
 }
 
 void OCGeometryHandler::Render() {
-  if (Obj != NULL) {
+  if (Obj != nullptr) {
     if (boolTriangulated == false)
       Triangulate();
     Renderer->Render(Triangulator->getObjectSurface());
-  } else if (ObjComp != NULL) {
+  } else if (ObjComp != nullptr) {
     Renderer->Render(ObjComp);
   }
 }
 
 void OCGeometryHandler::Initialize() {
-  if (Obj != NULL) {
+  if (Obj != nullptr) {
     if (boolTriangulated == false)
       Triangulate();
     Renderer->Initialize(Triangulator->getObjectSurface());
-  } else if (ObjComp != NULL) {
+  } else if (ObjComp != nullptr) {
     Renderer->Initialize(ObjComp);
   }
 }
 
 int OCGeometryHandler::NumberOfTriangles() {
-  if (Obj != NULL) {
+  if (Obj != nullptr) {
     if (boolTriangulated == false)
       Triangulate();
     return Triangulator->getNumberOfTriangles();
@@ -93,7 +93,7 @@ int OCGeometryHandler::NumberOfTriangles() {
 }
 
 int OCGeometryHandler::NumberOfPoints() {
-  if (Obj != NULL) {
+  if (Obj != nullptr) {
     if (boolTriangulated == false)
       Triangulate();
     return Triangulator->getNumberOfPoints();
@@ -103,22 +103,22 @@ int OCGeometryHandler::NumberOfPoints() {
 }
 
 double *OCGeometryHandler::getTriangleVertices() {
-  if (Obj != NULL) {
+  if (Obj != nullptr) {
     if (boolTriangulated == false)
       Triangulate();
     return Triangulator->getTriangleVertices();
   } else {
-    return NULL;
+    return nullptr;
   }
 }
 
 int *OCGeometryHandler::getTriangleFaces() {
-  if (Obj != NULL) {
+  if (Obj != nullptr) {
     if (boolTriangulated == false)
       Triangulate();
     return Triangulator->getTriangleFaces();
   } else {
-    return NULL;
+    return nullptr;
   }
 }
 }
diff --git a/Framework/Geometry/src/Rendering/OCGeometryRenderer.cpp b/Framework/Geometry/src/Rendering/OCGeometryRenderer.cpp
index e713533cada620f366ed1a6a7501815051a550ea..5e3cc6143788a93f4d3b404a5f16d25342fdd471 100644
--- a/Framework/Geometry/src/Rendering/OCGeometryRenderer.cpp
+++ b/Framework/Geometry/src/Rendering/OCGeometryRenderer.cpp
@@ -69,7 +69,7 @@ void OCGeometryRenderer::Render(TopoDS_Shape *ObjSurf) { Initialize(ObjSurf); }
  * @param ObjComp :: input to render
  */
 void OCGeometryRenderer::Render(IObjComponent *ObjComp) {
-  if (ObjComp == NULL)
+  if (ObjComp == nullptr)
     return;
   glPushMatrix();
   V3D pos = ObjComp->getPos();
@@ -117,7 +117,7 @@ void OCGeometryRenderer::Initialize(IObjComponent *ObjComp) {
  * Renders TopoDS Shape by traversing through the TopoDS_Shape
  */
 void OCGeometryRenderer::RenderTopoDS(TopoDS_Shape *ObjSurf) {
-  if ((ObjSurf != NULL) && !ObjSurf->IsNull()) {
+  if ((ObjSurf != nullptr) && !ObjSurf->IsNull()) {
     TopExp_Explorer Ex;
     for (Ex.Init(*ObjSurf, TopAbs_FACE); Ex.More(); Ex.Next()) {
       TopoDS_Face F = TopoDS::Face(Ex.Current());
diff --git a/Framework/Geometry/src/Rendering/vtkGeometryCacheReader.cpp b/Framework/Geometry/src/Rendering/vtkGeometryCacheReader.cpp
index ddfc5d61177d547f9f04b0bdcbeb9d373539900b..31b83401ebfb7b4f822ace21d588c7a845bfc9ed 100644
--- a/Framework/Geometry/src/Rendering/vtkGeometryCacheReader.cpp
+++ b/Framework/Geometry/src/Rendering/vtkGeometryCacheReader.cpp
@@ -35,7 +35,7 @@ Kernel::Logger g_log("vtkGeometryCacheReader");
  */
 vtkGeometryCacheReader::vtkGeometryCacheReader(std::string filename) {
   mFileName = filename;
-  mDoc = NULL;
+  mDoc = nullptr;
   Init();
 }
 
@@ -68,7 +68,7 @@ void vtkGeometryCacheReader::readCacheForObject(Object *obj) {
   std::stringstream objName;
   objName << obj->getName();
   Poco::XML::Element *pEle = getElementByObjectName(objName.str());
-  if (pEle == NULL) // Element not found
+  if (pEle == nullptr) // Element not found
   {
     g_log.debug("Cache not found for Object with name " + objName.str());
     return;
@@ -106,11 +106,11 @@ void vtkGeometryCacheReader::readCacheForObject(Object *obj) {
 Poco::XML::Element *
 vtkGeometryCacheReader::getElementByObjectName(std::string name) {
   Element *pRoot = mDoc->documentElement();
-  if (pRoot == NULL || pRoot->nodeName().compare("VTKFile") != 0)
-    return NULL;
+  if (pRoot == nullptr || pRoot->nodeName().compare("VTKFile") != 0)
+    return nullptr;
   Element *pPolyData = pRoot->getChildElement("PolyData");
-  if (pPolyData == NULL)
-    return NULL;
+  if (pPolyData == nullptr)
+    return nullptr;
   return pPolyData->getElementById(name, "name");
 }
 
@@ -119,13 +119,13 @@ vtkGeometryCacheReader::getElementByObjectName(std::string name) {
  */
 void vtkGeometryCacheReader::readPoints(Poco::XML::Element *pEle,
                                         int *noOfPoints, double **points) {
-  if (pEle == NULL) {
+  if (pEle == nullptr) {
     *noOfPoints = 0;
     return;
   }
   // Allocate memory
   *points = new double[(*noOfPoints) * 3];
-  if (*points == NULL) // Out of memory
+  if (*points == nullptr) // Out of memory
   {
     g_log.error("Cannot allocate memory for triangle cache of Object ");
     return;
@@ -145,13 +145,13 @@ void vtkGeometryCacheReader::readPoints(Poco::XML::Element *pEle,
  */
 void vtkGeometryCacheReader::readTriangles(Poco::XML::Element *pEle,
                                            int *noOfTriangles, int **faces) {
-  if (pEle == NULL) {
+  if (pEle == nullptr) {
     *noOfTriangles = 0;
     return;
   }
   // Allocate memory
   *faces = new int[(*noOfTriangles) * 3];
-  if (*faces == NULL) // Out of memory
+  if (*faces == nullptr) // Out of memory
   {
     g_log.error("Cannot allocate memory for triangle cache of Object ");
     return;
diff --git a/Framework/Geometry/src/Surfaces/SurfaceFactory.cpp b/Framework/Geometry/src/Surfaces/SurfaceFactory.cpp
index 6b5fa1f79d9c1ee1fb95e8fc21efcd1c1fbf32c8..fdbaf8ea922a3100457aaa9eac9a4e0c1b99379c 100644
--- a/Framework/Geometry/src/Surfaces/SurfaceFactory.cpp
+++ b/Framework/Geometry/src/Surfaces/SurfaceFactory.cpp
@@ -30,7 +30,7 @@ namespace Mantid {
 
 namespace Geometry {
 
-SurfaceFactory *SurfaceFactory::FOBJ(0);
+SurfaceFactory *SurfaceFactory::FOBJ(nullptr);
 
 SurfaceFactory *SurfaceFactory::Instance()
 /**
diff --git a/Framework/ICat/src/CatalogDownloadDataFiles.cpp b/Framework/ICat/src/CatalogDownloadDataFiles.cpp
index c2f9ba5b2fb3b7615a77358a413ace5ed3fdedad..d1c975b24e493bb97073d39e9fee6cd7eb987098 100644
--- a/Framework/ICat/src/CatalogDownloadDataFiles.cpp
+++ b/Framework/ICat/src/CatalogDownloadDataFiles.cpp
@@ -162,7 +162,7 @@ std::string CatalogDownloadDataFiles::doDownloadandSavetoLocalDrive(
                                Poco::Net::Context::VERIFY_NONE);
     // Create a singleton for holding the default context. E.g. any future
     // requests to publish are made to this certificate and context.
-    Poco::Net::SSLManager::instance().initializeClient(NULL, certificateHandler,
+    Poco::Net::SSLManager::instance().initializeClient(nullptr, certificateHandler,
                                                        context);
 
     // Session takes ownership of socket
diff --git a/Framework/ICat/src/CatalogPublish.cpp b/Framework/ICat/src/CatalogPublish.cpp
index 0f1b6157a2c6a6a4f8077980da38a5b55448b024..80a8c4842fef439d8901b8400d1f2490fb899ad6 100644
--- a/Framework/ICat/src/CatalogPublish.cpp
+++ b/Framework/ICat/src/CatalogPublish.cpp
@@ -152,7 +152,7 @@ void CatalogPublish::publish(std::istream &fileContents,
                                Poco::Net::Context::VERIFY_NONE);
     // Create a singleton for holding the default context. E.g. any future
     // requests to publish are made to this certificate and context.
-    Poco::Net::SSLManager::instance().initializeClient(NULL, certificateHandler,
+    Poco::Net::SSLManager::instance().initializeClient(nullptr, certificateHandler,
                                                        context);
     Poco::Net::HTTPSClientSession session(uri.getHost(), uri.getPort(),
                                           context);
diff --git a/Framework/ICat/src/ICat3/ICat3Helper.cpp b/Framework/ICat/src/ICat3/ICat3Helper.cpp
index d350acbaf1cba78f423c7847916fa83f9774a038..b40971ab023715b33210f170e00879e49eaca1f4 100644
--- a/Framework/ICat/src/ICat3/ICat3Helper.cpp
+++ b/Framework/ICat/src/ICat3/ICat3Helper.cpp
@@ -188,8 +188,8 @@ void CICatHelper::saveInvestigationIncludesResponse(
         savetoTableWorkspace((*datafile_citr)->location, t);
 
         // File creation Time.
-        std::string *creationtime = NULL;
-        if ((*datafile_citr)->datafileCreateTime != NULL) {
+        std::string *creationtime = nullptr;
+        if ((*datafile_citr)->datafileCreateTime != nullptr) {
           time_t crtime = *(*datafile_citr)->datafileCreateTime;
           char temp[25];
           strftime(temp, 25, "%Y-%b-%d %H:%M:%S", localtime(&crtime));
@@ -698,12 +698,12 @@ void CICatHelper::setICATProxySettings(ICat3::ICATPortBindingProxy &icat) {
 void CICatHelper::setSSLContext(ICat3::ICATPortBindingProxy &icat) {
   if (soap_ssl_client_context(
           &icat, SOAP_SSL_CLIENT, /* use SOAP_SSL_DEFAULT in production code */
-          NULL, /* keyfile: required only when client must authenticate to
+          nullptr, /* keyfile: required only when client must authenticate to
                 server (see SSL docs on how to obtain this file) */
-          NULL, /* password to read the keyfile */
-          NULL, /* optional cacert file to store trusted certificates */
-          NULL, /* optional capath to directory with trusted certificates */
-          NULL  /* if randfile!=NULL: use a file with random data to seed
+          nullptr, /* password to read the keyfile */
+          nullptr, /* optional cacert file to store trusted certificates */
+          nullptr, /* optional capath to directory with trusted certificates */
+          nullptr  /* if randfile!=NULL: use a file with random data to seed
                    randomness */
           )) {
     CErrorHandling::throwErrorMessages(icat);
diff --git a/Framework/ICat/src/ICat4/ICat4Catalog.cpp b/Framework/ICat/src/ICat4/ICat4Catalog.cpp
index c6ed4b9a885e8ad44561d9e41333b8260c0429e0..e6532ec61a117ab947841e1eaf86fe72b506656c 100644
--- a/Framework/ICat/src/ICat4/ICat4Catalog.cpp
+++ b/Framework/ICat/src/ICat4/ICat4Catalog.cpp
@@ -713,12 +713,12 @@ void ICat4Catalog::keepAlive() {
 void ICat4Catalog::setSSLContext(ICATPortBindingProxy &icat) {
   if (soap_ssl_client_context(
           &icat, SOAP_SSL_CLIENT, /* use SOAP_SSL_DEFAULT in production code */
-          NULL, /* keyfile: required only when client must authenticate to
+          nullptr, /* keyfile: required only when client must authenticate to
         server (see SSL docs on how to obtain this file) */
-          NULL, /* password to read the keyfile */
-          NULL, /* optional cacert file to store trusted certificates */
-          NULL, /* optional capath to directory with trusted certificates */
-          NULL  /* if randfile!=NULL: use a file with random data to seed
+          nullptr, /* password to read the keyfile */
+          nullptr, /* optional cacert file to store trusted certificates */
+          nullptr, /* optional capath to directory with trusted certificates */
+          nullptr  /* if randfile!=NULL: use a file with random data to seed
                    randomness */
           )) {
     throwErrorMessage(icat);
diff --git a/Framework/ISISLiveData/src/FakeISISEventDAE.cpp b/Framework/ISISLiveData/src/FakeISISEventDAE.cpp
index c699dfb941193e5c54e70e3187967bd923ac0a01..bb362861f98660d1d89079457871ec553f693507 100644
--- a/Framework/ISISLiveData/src/FakeISISEventDAE.cpp
+++ b/Framework/ISISLiveData/src/FakeISISEventDAE.cpp
@@ -148,7 +148,7 @@ public:
 };
 
 /// (Empty) Constructor
-FakeISISEventDAE::FakeISISEventDAE() : m_server(NULL) {}
+FakeISISEventDAE::FakeISISEventDAE() : m_server(nullptr) {}
 
 /// Destructor
 FakeISISEventDAE::~FakeISISEventDAE() {
@@ -222,7 +222,7 @@ void FakeISISEventDAE::exec() {
   histoDAEHandle.wait();
   if (m_server) {
     m_server->stop();
-    m_server = NULL;
+    m_server = nullptr;
   }
   socket.close();
 
diff --git a/Framework/Kernel/src/ConfigService.cpp b/Framework/Kernel/src/ConfigService.cpp
index 426e5bbafa01e61376019a0915dc976f51a5a767..da457b8236c1c74029e870d28d8a5cd9c927ec09 100644
--- a/Framework/Kernel/src/ConfigService.cpp
+++ b/Framework/Kernel/src/ConfigService.cpp
@@ -141,7 +141,7 @@ private:
 
 /// Private constructor for singleton class
 ConfigServiceImpl::ConfigServiceImpl()
-    : m_pConf(NULL), m_pSysConfig(NULL), m_changed_keys(), m_ConfigPaths(),
+    : m_pConf(nullptr), m_pSysConfig(nullptr), m_changed_keys(), m_ConfigPaths(),
       m_AbsolutePaths(), m_strBaseDir(""), m_PropertyString(""),
       m_properties_file_name("Mantid.properties"),
 #ifdef MPI_BUILD
@@ -155,7 +155,7 @@ ConfigServiceImpl::ConfigServiceImpl()
       m_instr_prefixes(), m_proxyInfo(), m_isProxySet(false) {
   // getting at system details
   m_pSysConfig = new WrappedObject<Poco::Util::SystemConfiguration>;
-  m_pConf = 0;
+  m_pConf = nullptr;
 
   // Register the FilterChannel with the Poco logging factory
   Poco::LoggingFactory::defaultFactory().registerChannelClass(
@@ -405,7 +405,7 @@ void ConfigServiceImpl::configureLogging() {
 
         // Try to create or append to the file. If it fails, use the default
         FILE *fp = fopen(m_logFilePath.c_str(), "a+");
-        if (fp == NULL) {
+        if (fp == nullptr) {
           std::cerr
               << "Error writing to log file path given in properties file: \""
               << m_logFilePath << "\". Will use a default path instead."
@@ -1311,7 +1311,7 @@ std::string ConfigServiceImpl::getOSVersionReadable() {
     try {
       Poco::Pipe outPipe, errorPipe;
       Poco::ProcessHandle ph =
-          Poco::Process::launch(cmd, args, 0, &outPipe, &errorPipe);
+          Poco::Process::launch(cmd, args, nullptr, &outPipe, &errorPipe);
       const int rc = ph.wait();
       // Only if the command returned successfully.
       if (rc == 0) {
@@ -1978,7 +1978,7 @@ void ConfigServiceImpl::setConsoleLogLevel(int logLevel) {
 */
 void ConfigServiceImpl::setFilterChannelLogLevel(
     const std::string &filterChannelName, int logLevel) {
-  Poco::Channel *channel = NULL;
+  Poco::Channel *channel = nullptr;
   try {
     channel = Poco::LoggingRegistry::defaultRegistry().channelForName(
         filterChannelName);
diff --git a/Framework/Kernel/src/DataItem.cpp b/Framework/Kernel/src/DataItem.cpp
index 56ed17a103d1e5729aa1f66a69dc8b6912b191f1..7e5c010234d6045a74bf616178ec0fa60187ecd1 100644
--- a/Framework/Kernel/src/DataItem.cpp
+++ b/Framework/Kernel/src/DataItem.cpp
@@ -24,7 +24,7 @@ DataItem::DataItem(const DataItem & /*other*/) {
  */
 DataItem::~DataItem() {
   delete m_lock;
-  m_lock = NULL;
+  m_lock = nullptr;
 }
 
 /** Private method to access the RWLock object.
diff --git a/Framework/Kernel/src/DateAndTime.cpp b/Framework/Kernel/src/DateAndTime.cpp
index 1e3b63eec9a45f1be1ec86ca0d930865b498091b..687c59c5b03b1810f140e8b713e48b9bb329b000 100644
--- a/Framework/Kernel/src/DateAndTime.cpp
+++ b/Framework/Kernel/src/DateAndTime.cpp
@@ -90,7 +90,7 @@ time_t utc_mktime(struct tm *utctime) {
   result = mktime(&tmp);
   if (result == (time_t)-1)
     return (time_t)-1;
-  if (gmtime_r_portable(&result, &check) == NULL)
+  if (gmtime_r_portable(&result, &check) == nullptr)
     return (time_t)-1;
 
   // loop until match
@@ -111,7 +111,7 @@ time_t utc_mktime(struct tm *utctime) {
     if (result == (time_t)-1)
       return (time_t)-1;
     gmtime_r_portable(&result, &check);
-    if (gmtime_r_portable(&result, &check) == NULL)
+    if (gmtime_r_portable(&result, &check) == nullptr)
       return (time_t)-1;
     // Seems like there can be endless loops at the end of a month? E.g. sep 30,
     // 2010 at 4:40 pm. This is to avoid it.
diff --git a/Framework/Kernel/src/DateValidator.cpp b/Framework/Kernel/src/DateValidator.cpp
index 4f7eee94a2965d71a42716a384035b05ade82914..3322a09db4e18adc3787b822a74d9c42d74a7290 100644
--- a/Framework/Kernel/src/DateValidator.cpp
+++ b/Framework/Kernel/src/DateValidator.cpp
@@ -30,7 +30,7 @@ struct tm getTimeValue(const std::string &sDate, std::string &error) {
   timeinfo.tm_isdst = -1;
 #ifndef _WIN32
   timeinfo.tm_gmtoff = 0;
-  timeinfo.tm_zone = 0;
+  timeinfo.tm_zone = nullptr;
 #endif
 
   std::basic_string<char>::size_type index, off = 0;
diff --git a/Framework/Kernel/src/DiskBuffer.cpp b/Framework/Kernel/src/DiskBuffer.cpp
index fd6fc09fbbd8404ea43e3b2d68649a050b71fd26..ec910adb4dd79b141b7e61042f97e5a4b168abea 100644
--- a/Framework/Kernel/src/DiskBuffer.cpp
+++ b/Framework/Kernel/src/DiskBuffer.cpp
@@ -44,7 +44,7 @@ DiskBuffer::~DiskBuffer() {}
  * @param item :: item that can be written to disk.
  */
 void DiskBuffer::toWrite(ISaveable *item) {
-  if (item == NULL)
+  if (item == nullptr)
     return;
   //    if (!m_useWriteBuffer) return;
 
@@ -81,7 +81,7 @@ void DiskBuffer::toWrite(ISaveable *item) {
  * @param item :: ISaveable object that is getting deleted.
  */
 void DiskBuffer::objectDeleted(ISaveable *item) {
-  if (item == NULL)
+  if (item == nullptr)
     return;
   // have it ever been in the buffer?
   m_mutex.lock();
@@ -119,7 +119,7 @@ void DiskBuffer::writeOldObjects() {
   auto it = m_toWriteBuffer.begin();
   auto it_end = m_toWriteBuffer.end();
 
-  ISaveable *obj = NULL;
+  ISaveable *obj = nullptr;
 
   for (; it != it_end; ++it) {
     obj = *it;
diff --git a/Framework/Kernel/src/EnabledWhenProperty.cpp b/Framework/Kernel/src/EnabledWhenProperty.cpp
index 61e0221235118d8e6e5b262dd947fbf654654479..57d1df52a69574506f74fa633ad3c5c065764306 100644
--- a/Framework/Kernel/src/EnabledWhenProperty.cpp
+++ b/Framework/Kernel/src/EnabledWhenProperty.cpp
@@ -15,9 +15,9 @@ EnabledWhenProperty::~EnabledWhenProperty() {}
 bool EnabledWhenProperty::fulfillsCriterion(
     const IPropertyManager *algo) const {
   // Find the property
-  if (algo == NULL)
+  if (algo == nullptr)
     return true;
-  Property *prop = NULL;
+  Property *prop = nullptr;
   try {
     prop = algo->getPointerToProperty(m_otherPropName);
   } catch (Exception::NotFoundError &) {
diff --git a/Framework/Kernel/src/FilterChannel.cpp b/Framework/Kernel/src/FilterChannel.cpp
index c6dab197e19ac841f9ce65520453d0ba5fd0842d..68c3b8632a40672bf27bf31498ccc68126db2bb5 100644
--- a/Framework/Kernel/src/FilterChannel.cpp
+++ b/Framework/Kernel/src/FilterChannel.cpp
@@ -7,7 +7,7 @@
 
 namespace Poco {
 
-FilterChannel::FilterChannel() : _channel(0), _priority(8) {}
+FilterChannel::FilterChannel() : _channel(nullptr), _priority(8) {}
 
 FilterChannel::~FilterChannel() { close(); }
 
@@ -44,7 +44,7 @@ void FilterChannel::log(const Message &msg) {
 
 void FilterChannel::close() {
   FastMutex::ScopedLock lock(_mutex);
-  if (_channel != NULL) {
+  if (_channel != nullptr) {
     _channel->release();
   }
 }
diff --git a/Framework/Kernel/src/FilteredTimeSeriesProperty.cpp b/Framework/Kernel/src/FilteredTimeSeriesProperty.cpp
index 52a8e817ddbf20788717bb5f012aedc036f702a0..b602bfd98eb9612a553629ea5a43406d0adbd605 100644
--- a/Framework/Kernel/src/FilteredTimeSeriesProperty.cpp
+++ b/Framework/Kernel/src/FilteredTimeSeriesProperty.cpp
@@ -17,7 +17,7 @@ template <typename HeldType>
 FilteredTimeSeriesProperty<HeldType>::FilteredTimeSeriesProperty(
     TimeSeriesProperty<HeldType> *seriesProp,
     const TimeSeriesProperty<bool> &filterProp, const bool transferOwnership)
-    : TimeSeriesProperty<HeldType>(*seriesProp), m_unfiltered(NULL) {
+    : TimeSeriesProperty<HeldType>(*seriesProp), m_unfiltered(nullptr) {
   if (transferOwnership)
     m_unfiltered = seriesProp;
   else
diff --git a/Framework/Kernel/src/InternetHelper.cpp b/Framework/Kernel/src/InternetHelper.cpp
index 09cf0b15931b830a61a93ad2b8ab5664f81b3370..7f1618aa3d5b12230ab2dd5a9d7e658b1b949613 100644
--- a/Framework/Kernel/src/InternetHelper.cpp
+++ b/Framework/Kernel/src/InternetHelper.cpp
@@ -54,8 +54,8 @@ Logger g_log("InternetHelper");
 InternetHelper::InternetHelper()
     : m_proxyInfo(), m_isProxySet(false), m_timeout(30), m_isTimeoutSet(false),
       m_contentLength(0), m_method(HTTPRequest::HTTP_GET),
-      m_contentType("application/json"), m_body(), m_headers(), m_request(NULL),
-      m_response(NULL) {}
+      m_contentType("application/json"), m_body(), m_headers(), m_request(nullptr),
+      m_response(nullptr) {}
 
 //----------------------------------------------------------------------------------------------
 /** Constructor
@@ -64,16 +64,16 @@ InternetHelper::InternetHelper(const Kernel::ProxyInfo &proxy)
     : m_proxyInfo(proxy), m_isProxySet(true), m_timeout(30),
       m_isTimeoutSet(false), m_contentLength(0),
       m_method(HTTPRequest::HTTP_GET), m_contentType("application/json"),
-      m_body(), m_headers(), m_request(NULL), m_response(NULL) {}
+      m_body(), m_headers(), m_request(nullptr), m_response(nullptr) {}
 
 //----------------------------------------------------------------------------------------------
 /** Destructor
 */
 InternetHelper::~InternetHelper() {
-  if (m_request != NULL) {
+  if (m_request != nullptr) {
     delete m_request;
   }
-  if (m_response != NULL) {
+  if (m_response != nullptr) {
     delete m_response;
   }
 }
@@ -88,10 +88,10 @@ void InternetHelper::setupProxyOnSession(HTTPClientSession &session,
 }
 
 void InternetHelper::createRequest(Poco::URI &uri) {
-  if (m_request != NULL) {
+  if (m_request != nullptr) {
     delete m_request;
   }
-  if (m_response != NULL) {
+  if (m_response != nullptr) {
     delete m_response;
   }
 
@@ -248,7 +248,7 @@ int InternetHelper::sendHTTPSRequest(const std::string &url,
     // Create a singleton for holding the default context.
     // e.g. any future requests to publish are made to this certificate and
     // context.
-    SSLManager::instance().initializeClient(NULL, certificateHandler, context);
+    SSLManager::instance().initializeClient(nullptr, certificateHandler, context);
     // Create the session
     HTTPSClientSession session(uri.getHost(),
                                static_cast<Poco::UInt16>(uri.getPort()));
@@ -529,7 +529,7 @@ void InternetHelper::setBody(const std::ostringstream &body) {
 void InternetHelper::setBody(Poco::Net::HTMLForm &form) {
 
   setMethod("POST");
-  if (m_request == NULL) {
+  if (m_request == nullptr) {
     Poco::URI uri("http://www.mantidproject.org");
     createRequest(uri);
   }
@@ -602,7 +602,7 @@ void InternetHelper::reset() {
   m_body = "";
   m_method = HTTPRequest::HTTP_GET;
   m_contentType = "application/json";
-  m_request = NULL;
+  m_request = nullptr;
 }
 
 } // namespace Kernel
diff --git a/Framework/Kernel/src/LibraryWrapper.cpp b/Framework/Kernel/src/LibraryWrapper.cpp
index c371ef0c093619fccbe81f641a144cacae09f92a..9172ddf789109b3b01ca2bdeb3108de748bf3428 100644
--- a/Framework/Kernel/src/LibraryWrapper.cpp
+++ b/Framework/Kernel/src/LibraryWrapper.cpp
@@ -5,14 +5,14 @@ namespace Mantid {
 namespace Kernel {
 
 /// Constructor
-LibraryWrapper::LibraryWrapper() : module(0) {}
+LibraryWrapper::LibraryWrapper() : module(nullptr) {}
 
 /// Destructor
 LibraryWrapper::~LibraryWrapper() {
   // Close lib
   if (module) {
     DllOpen::CloseDll(module);
-    module = 0;
+    module = nullptr;
   }
 }
 
diff --git a/Framework/Kernel/src/LogFilter.cpp b/Framework/Kernel/src/LogFilter.cpp
index 6cd99a7daec8c518e3e4422c279334d52e21e543..3a868ba2b316745510015dc812b053d874f02368 100644
--- a/Framework/Kernel/src/LogFilter.cpp
+++ b/Framework/Kernel/src/LogFilter.cpp
@@ -128,7 +128,7 @@ template <typename SrcType> struct ConvertToTimeSeriesDouble {
     auto srcTypeSeries =
         dynamic_cast<const TimeSeriesProperty<SrcType> *>(prop);
     if (!srcTypeSeries)
-      return NULL;
+      return nullptr;
     auto converted = new TimeSeriesProperty<double>(prop->name());
     auto pmap = srcTypeSeries->valueAsMap();
     for (auto it = pmap.begin(); it != pmap.end(); ++it) {
@@ -143,7 +143,7 @@ template <> struct ConvertToTimeSeriesDouble<double> {
   static TimeSeriesProperty<double> *apply(const Property *prop) {
     auto doubleSeries = dynamic_cast<const TimeSeriesProperty<double> *>(prop);
     if (!doubleSeries)
-      return NULL;
+      return nullptr;
     return doubleSeries->clone();
   }
 };
diff --git a/Framework/Kernel/src/LogParser.cpp b/Framework/Kernel/src/LogParser.cpp
index b4f3c9528ee0e15fc8ebd9a40b2338888dfdac86..6a1bdc49e726124784f27501099b8b90fd1d0725 100644
--- a/Framework/Kernel/src/LogParser.cpp
+++ b/Framework/Kernel/src/LogParser.cpp
@@ -38,7 +38,7 @@ Kernel::Property *LogParser::createLogProperty(const std::string &logFName,
   std::ifstream file(logFName.c_str());
   if (!file) {
     g_log.warning() << "Cannot open log file " << logFName << "\n";
-    return 0;
+    return nullptr;
   }
 
   // Change times and new values read from file
@@ -95,7 +95,7 @@ Kernel::Property *LogParser::createLogProperty(const std::string &logFName,
   }
 
   if (change_times.empty())
-    return 0;
+    return nullptr;
 
   if (isNumeric) {
     auto logv = new Kernel::TimeSeriesProperty<double>(name);
@@ -115,7 +115,7 @@ Kernel::Property *LogParser::createLogProperty(const std::string &logFName,
     }
     return logv;
   }
-  return 0;
+  return nullptr;
 }
 
 /**
diff --git a/Framework/Kernel/src/Math/Optimization/SLSQPMinimizer.cpp b/Framework/Kernel/src/Math/Optimization/SLSQPMinimizer.cpp
index 38788db5a4420ccc2ffd984d634aa48c72726c71..cbd40ca159879c16bd1142327ba87ce21028da67 100644
--- a/Framework/Kernel/src/Math/Optimization/SLSQPMinimizer.cpp
+++ b/Framework/Kernel/src/Math/Optimization/SLSQPMinimizer.cpp
@@ -179,7 +179,7 @@ void SLSQPMinimizer::initializeConstraints(const DblMatrix &equality,
 
   size_t constrCounter(0);
   while (constrCounter < totalNumConstr) {
-    const DblMatrix *constrMatrix(NULL);
+    const DblMatrix *constrMatrix(nullptr);
     if (constrCounter < numEqualityConstraints())
       constrMatrix = &equality;
     else
diff --git a/Framework/Kernel/src/Matrix.cpp b/Framework/Kernel/src/Matrix.cpp
index 530aa6b5cc6dc1188ec5a0430132a7c0ce40fcd0..13e61181bbea6b8b1f3b0c7d1ac7976ec5a4ba7c 100644
--- a/Framework/Kernel/src/Matrix.cpp
+++ b/Framework/Kernel/src/Matrix.cpp
@@ -83,7 +83,7 @@ template <typename T> std::vector<T> Matrix<T>::getVector() const {
 //
 template <typename T>
 Matrix<T>::Matrix(const size_t nrow, const size_t ncol, const bool makeIdentity)
-    : nx(0), ny(0), V(0)
+    : nx(0), ny(0), V(nullptr)
 /**
   Constructor with pre-set sizes. Matrix is zeroed
   @param nrow :: number of rows
@@ -100,7 +100,7 @@ Matrix<T>::Matrix(const size_t nrow, const size_t ncol, const bool makeIdentity)
 
 template <typename T>
 Matrix<T>::Matrix(const std::vector<T> &A, const std::vector<T> &B)
-    : nx(0), ny(0), V(0)
+    : nx(0), ny(0), V(nullptr)
 /**
   Constructor to take two vectors and multiply them to
   construct a matrix. (assuming that we have columns x row
@@ -120,7 +120,7 @@ Matrix<T>::Matrix(const std::vector<T> &A, const std::vector<T> &B)
 //
 template <typename T>
 Matrix<T>::Matrix(const std::vector<T> &data)
-    : nx(0), ny(0), V(0) {
+    : nx(0), ny(0), V(nullptr) {
   size_t numel = data.size();
   size_t nxt = (size_t)sqrt(double(numel));
   size_t test = nxt * nxt;
@@ -142,7 +142,7 @@ Matrix<T>::Matrix(const std::vector<T> &data)
 
 template <typename T>
 Matrix<T>::Matrix(const Matrix<T> &A, const size_t nrow, const size_t ncol)
-    : nx(A.nx - 1), ny(A.ny - 1), V(0)
+    : nx(A.nx - 1), ny(A.ny - 1), V(nullptr)
 /**
   Constructor with for a missing row/column.
   @param A :: The input matrix
@@ -178,7 +178,7 @@ Matrix<T>::Matrix(const Matrix<T> &A, const size_t nrow, const size_t ncol)
 
 template <typename T>
 Matrix<T>::Matrix(const Matrix<T> &A)
-    : nx(0), ny(0), V(0)
+    : nx(0), ny(0), V(nullptr)
 /**
   Simple copy constructor
   @param A :: Object to copy
@@ -545,7 +545,7 @@ void Matrix<T>::deleteMem()
   if (V) {
     delete[] * V;
     delete[] V;
-    V = 0;
+    V = nullptr;
   }
   nx = 0;
   ny = 0;
diff --git a/Framework/Kernel/src/Memory.cpp b/Framework/Kernel/src/Memory.cpp
index 448b22767877e15c80932f654fd6d317fae79479..66f4967360da55b68b462b9e9b1805b2f5cd945d 100644
--- a/Framework/Kernel/src/Memory.cpp
+++ b/Framework/Kernel/src/Memory.cpp
@@ -229,7 +229,7 @@ void MemoryStats::process_mem_system(size_t &sys_avail, size_t &sys_total) {
   uint64_t totalmem;
   size_t len = sizeof(totalmem);
   // Gives system memory in bytes
-  int err = sysctlbyname("hw.memsize", &totalmem, &len, NULL, 0);
+  int err = sysctlbyname("hw.memsize", &totalmem, &len, nullptr, 0);
   if (err)
     g_log.warning("Unable to obtain memory of system");
   sys_total = totalmem / 1024;
diff --git a/Framework/Kernel/src/MersenneTwister.cpp b/Framework/Kernel/src/MersenneTwister.cpp
index c940b8b2d40b8406920eebeabc40c079367f8191..5148e0d80e561a7c2423f802ade3eff6ea764c2d 100644
--- a/Framework/Kernel/src/MersenneTwister.cpp
+++ b/Framework/Kernel/src/MersenneTwister.cpp
@@ -16,7 +16,7 @@ namespace Kernel {
  */
 MersenneTwister::MersenneTwister(const size_t seedValue)
     : m_generator(), m_uniform_dist(), m_currentSeed(0),
-      m_savedStateGenerator(NULL) {
+      m_savedStateGenerator(nullptr) {
   setSeed(seedValue);
   setRange(0.0, 1.0);
 }
@@ -30,7 +30,7 @@ MersenneTwister::MersenneTwister(const size_t seedValue)
 MersenneTwister::MersenneTwister(const size_t seedValue, const double start,
                                  const double end)
     : m_generator(), m_uniform_dist(), m_currentSeed(),
-      m_savedStateGenerator(NULL) {
+      m_savedStateGenerator(nullptr) {
   setSeed(seedValue);
   setRange(start, end);
 }
@@ -48,7 +48,7 @@ void MersenneTwister::setSeed(const size_t seedValue) {
   m_currentSeed = (boost::mt19937::result_type)seedValue;
   m_generator.seed(m_currentSeed);
   delete m_savedStateGenerator;
-  m_savedStateGenerator = NULL;
+  m_savedStateGenerator = nullptr;
 }
 
 /**
diff --git a/Framework/Kernel/src/NetworkProxyOSX.cpp b/Framework/Kernel/src/NetworkProxyOSX.cpp
index 1db21340e15d78b4739bea3863204d327fb6cda6..4dcd0e0d9d3c07fe36b928f6b995ff0e8e5eea63 100644
--- a/Framework/Kernel/src/NetworkProxyOSX.cpp
+++ b/Framework/Kernel/src/NetworkProxyOSX.cpp
@@ -108,10 +108,10 @@ ProxyInfoVec proxyInformationFromPac(CFDictionaryRef dict,
           dict, kSCPropNetProxiesProxyAutoConfigURLString);
       CFDataRef pacData;
       CFURLRef pacURL =
-          CFURLCreateWithString(kCFAllocatorDefault, cfPacLocation, NULL);
+          CFURLCreateWithString(kCFAllocatorDefault, cfPacLocation, nullptr);
       SInt32 errorCode;
       if (!CFURLCreateDataAndPropertiesFromResource(
-              kCFAllocatorDefault, pacURL, &pacData, NULL, NULL, &errorCode)) {
+              kCFAllocatorDefault, pacURL, &pacData, nullptr, nullptr, &errorCode)) {
         logger.debug() << "Unable to get the PAC script at "
                        << toString(cfPacLocation) << "Error code: " << errorCode
                        << std::endl;
@@ -123,7 +123,7 @@ ProxyInfoVec proxyInformationFromPac(CFDictionaryRef dict,
 
       CFURLRef targetURL = CFURLCreateWithBytes(
           kCFAllocatorDefault, (UInt8 *)targetURLString.c_str(),
-          targetURLString.size(), kCFStringEncodingUTF8, NULL);
+          targetURLString.size(), kCFStringEncodingUTF8, nullptr);
       if (!targetURL) {
         logger.debug("Problem with Target URI for proxy script");
         return proxyInfoVec;
@@ -207,7 +207,7 @@ ProxyInfo httpProxyFromSystem(CFDictionaryRef dict) {
 ProxyInfo findHttpProxy(const std::string &targetURLString,
                         Mantid::Kernel::Logger &logger) {
   ProxyInfo httpProxy;
-  CFDictionaryRef dict = SCDynamicStoreCopyProxies(NULL);
+  CFDictionaryRef dict = SCDynamicStoreCopyProxies(nullptr);
   if (!dict) {
     logger.debug("NetworkProxyOSX SCDynamicStoreCopyProxies returned NULL");
   }
diff --git a/Framework/Kernel/src/NexusDescriptor.cpp b/Framework/Kernel/src/NexusDescriptor.cpp
index f05232f4cb511d9c0480bd7ef033a8fc040fc90f..2532289589f3e14a89b0e38448bf55f7d11c254e 100644
--- a/Framework/Kernel/src/NexusDescriptor.cpp
+++ b/Framework/Kernel/src/NexusDescriptor.cpp
@@ -113,7 +113,7 @@ bool NexusDescriptor::isHDF(const std::string &filename,
  */
 NexusDescriptor::NexusDescriptor(const std::string &filename)
     : m_filename(), m_extension(), m_firstEntryNameType(), m_rootAttrs(),
-      m_pathsToTypes(), m_file(NULL) {
+      m_pathsToTypes(), m_file(nullptr) {
   if (filename.empty()) {
     throw std::invalid_argument("NexusDescriptor() - Empty filename '" +
                                 filename + "'");
diff --git a/Framework/Kernel/src/Property.cpp b/Framework/Kernel/src/Property.cpp
index d3ec47e0a3c5badcfb6f7dc0b21b17d359d42ec8..8c849533e51e6e2e86891db62ba948d84af7dad5 100644
--- a/Framework/Kernel/src/Property.cpp
+++ b/Framework/Kernel/src/Property.cpp
@@ -18,7 +18,7 @@ namespace Kernel {
 Property::Property(const std::string &name, const std::type_info &type,
                    const unsigned int direction)
     : m_name(name), m_documentation(""), m_typeinfo(&type),
-      m_direction(direction), m_units(""), m_settings(NULL), m_group(""),
+      m_direction(direction), m_units(""), m_settings(nullptr), m_group(""),
       m_remember(true) {
   // Make sure a random int hasn't been passed in for the direction
   // Property & PropertyWithValue destructors will be called in this case
@@ -31,7 +31,7 @@ Property::Property(const std::string &name, const std::type_info &type,
 Property::Property(const Property &right)
     : m_name(right.m_name), m_documentation(right.m_documentation),
       m_typeinfo(right.m_typeinfo), m_direction(right.m_direction),
-      m_units(right.m_units), m_settings(NULL), m_group(right.m_group),
+      m_units(right.m_units), m_settings(nullptr), m_group(right.m_group),
       m_remember(right.m_remember) {
   if (right.m_settings)
     m_settings = right.m_settings->clone();
@@ -102,7 +102,7 @@ IPropertySettings *Property::getSettings() { return m_settings; }
  */
 void Property::deleteSettings() {
   delete m_settings;
-  m_settings = NULL;
+  m_settings = nullptr;
 }
 
 /**
diff --git a/Framework/Kernel/src/PropertyManager.cpp b/Framework/Kernel/src/PropertyManager.cpp
index 5641fe152c761228fd4f2ede1f8b16c0183be69e..0d330975ac08c633aa47363f2721c6404b8975b1 100644
--- a/Framework/Kernel/src/PropertyManager.cpp
+++ b/Framework/Kernel/src/PropertyManager.cpp
@@ -141,7 +141,7 @@ void PropertyManager::splitByTime(
         output_properties.push_back(
             outputs[i]->getPointerToPropertyOrNull(prop->name()));
       else
-        output_properties.push_back(NULL);
+        output_properties.push_back(nullptr);
     }
 
     // Now the property does the splitting.
@@ -500,7 +500,7 @@ PropertyManager::getPointerToPropertyOrNull(const std::string &name) const {
   if (it != m_properties.end()) {
     return it->second;
   }
-  return NULL;
+  return nullptr;
 }
 
 //-----------------------------------------------------------------------------------------------
diff --git a/Framework/Kernel/src/RemoteJobManager.cpp b/Framework/Kernel/src/RemoteJobManager.cpp
index d513398ab4b6a881b21e7613ae655a00bb16e244..d0e8c6b9c1e31cd2dc19aeafa25b009679aba599 100644
--- a/Framework/Kernel/src/RemoteJobManager.cpp
+++ b/Framework/Kernel/src/RemoteJobManager.cpp
@@ -25,7 +25,7 @@ Logger g_log("RemoteJobManager");
 RemoteJobManager::RemoteJobManager(const Poco::XML::Element *elem)
     : m_displayName(elem->getAttribute("name")),
       m_session(
-          NULL) // Make sure this is always either NULL or a valid pointer.
+          nullptr) // Make sure this is always either NULL or a valid pointer.
 {
   // Sanity check m_displayName
   if (m_displayName.length() == 0) {
@@ -196,7 +196,7 @@ void RemoteJobManager::initHTTPRequest(Poco::Net::HTTPRequest &req,
   // Set up the session object
   if (m_session) {
     delete m_session;
-    m_session = NULL;
+    m_session = nullptr;
   }
 
   if (Poco::URI(m_serviceBaseUrl).getScheme() == "https") {
diff --git a/Framework/Kernel/src/SingletonHolder.cpp b/Framework/Kernel/src/SingletonHolder.cpp
index 851e3e01fda96f145ca89d477fd7a957f4aebdb7..1a3a698b6144db5ddd82cdf06c7b8d80a32a0a5c 100644
--- a/Framework/Kernel/src/SingletonHolder.cpp
+++ b/Framework/Kernel/src/SingletonHolder.cpp
@@ -5,14 +5,14 @@ namespace Mantid {
 namespace Kernel {
 
 /// List of functions to call on program exit
-static std::list<atexit_func_t> *cleanup_list = NULL;
+static std::list<atexit_func_t> *cleanup_list = nullptr;
 
 /// Function registed to atexit() that will clean up
 /// all our singletons
 /// This function may be registed with atexit() more than once, so it needs to
 /// clear the list once it has called all the functions
 MANTID_KERNEL_DLL void CleanupSingletons() {
-  if (cleanup_list == NULL) {
+  if (cleanup_list == nullptr) {
     return;
   }
   std::list<atexit_func_t>::const_iterator it;
@@ -20,7 +20,7 @@ MANTID_KERNEL_DLL void CleanupSingletons() {
     (*(*it))();
   }
   delete cleanup_list;
-  cleanup_list = NULL;
+  cleanup_list = nullptr;
 }
 
 /// Adds singleton cleanup function to our atexit list
@@ -28,7 +28,7 @@ MANTID_KERNEL_DLL void CleanupSingletons() {
 /// first out
 /// @param func :: Exit function to call - the singleton destructor function
 MANTID_KERNEL_DLL void AddSingleton(atexit_func_t func) {
-  if (cleanup_list == NULL) {
+  if (cleanup_list == nullptr) {
     cleanup_list = new std::list<atexit_func_t>;
     atexit(&CleanupSingletons);
   }
diff --git a/Framework/Kernel/src/SobolSequence.cpp b/Framework/Kernel/src/SobolSequence.cpp
index 796fb6612e0c8db7a975f084c310b69e5612c16f..5592cc2d52079269df715eb07c8672a17eb4b979 100644
--- a/Framework/Kernel/src/SobolSequence.cpp
+++ b/Framework/Kernel/src/SobolSequence.cpp
@@ -10,8 +10,8 @@ namespace Kernel {
  * Constructor taking the number of dimensions for the sequence
  */
 SobolSequence::SobolSequence(const unsigned int ndims)
-    : QuasiRandomNumberSequence(ndims), m_gslGenerator(NULL),
-      m_savedGenerator(NULL) {
+    : QuasiRandomNumberSequence(ndims), m_gslGenerator(nullptr),
+      m_savedGenerator(nullptr) {
   setNumberOfDimensions(ndims);
 }
 
diff --git a/Framework/Kernel/src/TimeSeriesProperty.cpp b/Framework/Kernel/src/TimeSeriesProperty.cpp
index 3029ef935c99a120126c875891f993c37e2170ab..a45921644fccaf306a5112718b45a568e159e324 100644
--- a/Framework/Kernel/src/TimeSeriesProperty.cpp
+++ b/Framework/Kernel/src/TimeSeriesProperty.cpp
@@ -444,7 +444,7 @@ void TimeSeriesProperty<TYPE>::splitByTime(
         myOutput->m_size = 0;
       }
     } else {
-      outputs_tsp.push_back(NULL);
+      outputs_tsp.push_back(nullptr);
     }
   }
 
diff --git a/Framework/Kernel/src/Timer.cpp b/Framework/Kernel/src/Timer.cpp
index 343209ec78566a9491c5ccac91ce749db87f3ab4..df533ccfc46c838328724df0b721677e59c95061 100644
--- a/Framework/Kernel/src/Timer.cpp
+++ b/Framework/Kernel/src/Timer.cpp
@@ -15,7 +15,7 @@ Timer::Timer() {
 #ifdef _WIN32
   m_start = clock();
 #else /* linux & mac */
-  gettimeofday(&m_start, 0);
+  gettimeofday(&m_start, nullptr);
 #endif
 }
 
@@ -46,7 +46,7 @@ float Timer::elapsed_no_reset() const {
   const float retval = float(now - m_start) / CLOCKS_PER_SEC;
 #else /* linux & mac */
   timeval now;
-  gettimeofday(&now, 0);
+  gettimeofday(&now, nullptr);
   const float retval =
       float(now.tv_sec - m_start.tv_sec) +
       float(static_cast<float>(now.tv_usec - m_start.tv_usec) / 1e6);
@@ -60,7 +60,7 @@ void Timer::reset() {
   m_start = clock();
 #else /* linux & mac */
   timeval now;
-  gettimeofday(&now, 0);
+  gettimeofday(&now, nullptr);
   m_start = now;
 #endif
 }
diff --git a/Framework/LiveData/src/ADARA/ADARAPackets.cpp b/Framework/LiveData/src/ADARA/ADARAPackets.cpp
index 3f1a10f4e992d484c92c788b2f4bbe57a5f136a7..3a085d54bbd4be037d4a4c0482ebc93064a97c3a 100644
--- a/Framework/LiveData/src/ADARA/ADARAPackets.cpp
+++ b/Framework/LiveData/src/ADARA/ADARAPackets.cpp
@@ -120,7 +120,7 @@ SourceListPkt::SourceListPkt(const SourceListPkt &pkt) : Packet(pkt) {}
 
 BankedEventPkt::BankedEventPkt(const uint8_t *data, uint32_t len)
     : Packet(data, len), m_fields((const uint32_t *)payload()),
-      m_curEvent(NULL), m_lastFieldIndex(0), m_curFieldIndex(0),
+      m_curEvent(nullptr), m_lastFieldIndex(0), m_curFieldIndex(0),
       m_sourceStartIndex(0), m_bankCount(0), m_TOFOffset(0),
       m_isCorrected(false), m_bankNum(0), m_bankStartIndex(0), m_bankId(0),
       m_eventCount(0) {
@@ -131,7 +131,7 @@ BankedEventPkt::BankedEventPkt(const uint8_t *data, uint32_t len)
 }
 
 BankedEventPkt::BankedEventPkt(const BankedEventPkt &pkt)
-    : Packet(pkt), m_fields((const uint32_t *)payload()), m_curEvent(NULL),
+    : Packet(pkt), m_fields((const uint32_t *)payload()), m_curEvent(nullptr),
       m_lastFieldIndex(0), m_curFieldIndex(0), m_sourceStartIndex(0),
       m_bankCount(0), m_TOFOffset(0), m_isCorrected(false), m_bankNum(0),
       m_bankStartIndex(0), m_bankId(0), m_eventCount(0) {
@@ -149,9 +149,9 @@ BankedEventPkt::BankedEventPkt(const BankedEventPkt &pkt)
 // That means the only payload we're guarenteed to have is the first 4 fields.
 // After that, we've got to start checking against the payload len...
 const Event *BankedEventPkt::firstEvent() const {
-  m_curEvent = NULL;
+  m_curEvent = nullptr;
   m_curFieldIndex = 4;
-  while (m_curEvent == NULL && m_curFieldIndex <= m_lastFieldIndex) {
+  while (m_curEvent == nullptr && m_curFieldIndex <= m_lastFieldIndex) {
     // Start of a new source
     firstEventInSource();
   }
@@ -163,7 +163,7 @@ const Event *BankedEventPkt::nextEvent() const {
   if (m_curEvent) // If we're null, it's because we've already incremented past
                   // the last event
   {
-    m_curEvent = NULL;
+    m_curEvent = nullptr;
     m_curFieldIndex +=
         2; // go to where the next event will start (if there is a next event)
 
@@ -173,9 +173,9 @@ const Event *BankedEventPkt::nextEvent() const {
       m_curEvent = (const Event *)&m_fields[m_curFieldIndex];
     } else {
       m_bankNum++;
-      while (m_bankNum <= m_bankCount && m_curEvent == NULL) {
+      while (m_bankNum <= m_bankCount && m_curEvent == nullptr) {
         firstEventInBank();
-        if (m_curEvent == NULL) {
+        if (m_curEvent == nullptr) {
           // Increment banknum because there were no events in the bank we
           // just tested
           m_bankNum++;
@@ -183,7 +183,7 @@ const Event *BankedEventPkt::nextEvent() const {
       }
 
       // If we still haven't found an event, check for more source sections
-      while (m_curEvent == NULL && m_curFieldIndex < m_lastFieldIndex) {
+      while (m_curEvent == nullptr && m_curFieldIndex < m_lastFieldIndex) {
         firstEventInSource();
       }
     }
@@ -210,9 +210,9 @@ void BankedEventPkt::firstEventInSource() const {
     m_bankNum = 1; // banks are numbered from 1 to m_bankCount.
     m_curFieldIndex = m_sourceStartIndex + 4;
 
-    while (m_bankNum <= m_bankCount && m_curEvent == NULL) {
+    while (m_bankNum <= m_bankCount && m_curEvent == nullptr) {
       firstEventInBank();
-      if (m_curEvent == NULL) {
+      if (m_curEvent == nullptr) {
         // Increment banknum because there were no events in the bank we
         // just tested
         m_bankNum++;
@@ -221,7 +221,7 @@ void BankedEventPkt::firstEventInSource() const {
   } else // no banks in this source, skip to the next source
   {
     m_curFieldIndex += 4;
-    m_curEvent = NULL;
+    m_curEvent = nullptr;
   }
 }
 
@@ -239,7 +239,7 @@ void BankedEventPkt::firstEventInBank() const {
   if (m_eventCount > 0) {
     m_curEvent = (const Event *)&m_fields[m_curFieldIndex];
   } else {
-    m_curEvent = NULL;
+    m_curEvent = nullptr;
   }
 }
 
@@ -511,7 +511,7 @@ BeamMonitorConfigPkt::BeamMonitorConfigPkt(const BeamMonitorConfigPkt &pkt)
 
 DetectorBankSetsPkt::DetectorBankSetsPkt(const uint8_t *data, uint32_t len)
     : Packet(data, len), m_fields((const uint32_t *)payload()),
-      m_sectionOffsets(NULL), m_after_banks_offset(NULL) {
+      m_sectionOffsets(nullptr), m_after_banks_offset(nullptr) {
   // Get Number of Detector Bank Sets...
   //    - Basic Packet Size Sanity Check
 
@@ -564,9 +564,9 @@ DetectorBankSetsPkt::DetectorBankSetsPkt(const uint8_t *data, uint32_t len)
       msg += " payload_len=";
       msg += boost::lexical_cast<std::string>(m_payload_len);
       delete[] m_sectionOffsets;
-      m_sectionOffsets = (uint32_t *)NULL;
+      m_sectionOffsets = (uint32_t *)nullptr;
       delete[] m_after_banks_offset;
-      m_after_banks_offset = (uint32_t *)NULL;
+      m_after_banks_offset = (uint32_t *)nullptr;
       throw invalid_packet(msg);
     }
 
@@ -593,16 +593,16 @@ DetectorBankSetsPkt::DetectorBankSetsPkt(const uint8_t *data, uint32_t len)
     msg += " payload_len=";
     msg += boost::lexical_cast<std::string>(m_payload_len);
     delete[] m_sectionOffsets;
-    m_sectionOffsets = (uint32_t *)NULL;
+    m_sectionOffsets = (uint32_t *)nullptr;
     delete[] m_after_banks_offset;
-    m_after_banks_offset = (uint32_t *)NULL;
+    m_after_banks_offset = (uint32_t *)nullptr;
     throw invalid_packet(msg);
   }
 }
 
 DetectorBankSetsPkt::DetectorBankSetsPkt(const DetectorBankSetsPkt &pkt)
     : Packet(pkt), m_fields((const uint32_t *)payload()),
-      m_sectionOffsets(NULL), m_after_banks_offset(NULL) {
+      m_sectionOffsets(nullptr), m_after_banks_offset(nullptr) {
   uint32_t numSets = detBankSetCount();
 
   // Don't Allocate Anything if there are No Detector Bank Sets...
diff --git a/Framework/LiveData/src/ADARA/ADARAParser.cpp b/Framework/LiveData/src/ADARA/ADARAParser.cpp
index 5e5bea2611b1df0354231c9e5c75053e5b4f1a90..12347be980d2230174d71bea7cd6dc63e734759b 100644
--- a/Framework/LiveData/src/ADARA/ADARAParser.cpp
+++ b/Framework/LiveData/src/ADARA/ADARAParser.cpp
@@ -54,7 +54,7 @@ int Parser::bufferParse(std::string &log_info, unsigned int max_packets) {
     chunk_len = m_oversize_len;
     if (valid_len < chunk_len)
       chunk_len = valid_len;
-    stopped = rxOversizePkt(NULL, p, m_oversize_offset, chunk_len);
+    stopped = rxOversizePkt(nullptr, p, m_oversize_offset, chunk_len);
     m_oversize_offset += chunk_len;
     m_oversize_len -= chunk_len;
     valid_len -= chunk_len;
@@ -256,7 +256,7 @@ bool Parser::rxOversizePkt(const PacketHeader *hdr, const uint8_t *,
                            unsigned int, unsigned int) {
   // NOTE: ADARA::PacketHeader *hdr can be NULL...! ;-o
   /* Default is to discard the data */
-  if (hdr != NULL)
+  if (hdr != nullptr)
     (m_discarded_packets[hdr->type()])++;
   return false;
 }
diff --git a/Framework/LiveData/src/FakeISISHistoDAE.cpp b/Framework/LiveData/src/FakeISISHistoDAE.cpp
index 630b4e4638458223a2708277ddb6321d49da80fd..c6b84c8a6a2ead2235be6d9781989c446e0e7131 100644
--- a/Framework/LiveData/src/FakeISISHistoDAE.cpp
+++ b/Framework/LiveData/src/FakeISISHistoDAE.cpp
@@ -310,7 +310,7 @@ using namespace Kernel;
 using namespace API;
 
 /// (Empty) Constructor
-FakeISISHistoDAE::FakeISISHistoDAE() : m_server(NULL) {}
+FakeISISHistoDAE::FakeISISHistoDAE() : m_server(nullptr) {}
 
 /// Destructor
 FakeISISHistoDAE::~FakeISISHistoDAE() {
@@ -367,7 +367,7 @@ void FakeISISHistoDAE::exec() {
   }
   if (m_server) {
     m_server->stop();
-    m_server = NULL;
+    m_server = nullptr;
   }
   socket.close();
 }
diff --git a/Framework/LiveData/src/FileEventDataListener.cpp b/Framework/LiveData/src/FileEventDataListener.cpp
index 1ed3a89f3c01763327c869f2f9999fed6b969a89..1903cdb229ed938a52c34a31b35912f427e253f6 100644
--- a/Framework/LiveData/src/FileEventDataListener.cpp
+++ b/Framework/LiveData/src/FileEventDataListener.cpp
@@ -22,7 +22,7 @@ FileEventDataListener::FileEventDataListener()
     : ILiveListener(), m_filename(), m_runNumber(-1),
       m_tempWSname("__filelistenerchunk"), m_nextChunk(1),
       m_filePropName("Filename"), m_loaderName(""), m_canLoadMonitors(true),
-      m_chunkload(NULL) {
+      m_chunkload(nullptr) {
   std::string tfilename =
       ConfigService::Instance().getString("fileeventdatalistener.filename");
   if (tfilename.empty()) {
@@ -101,7 +101,7 @@ ILiveListener::RunStatus FileEventDataListener::runStatus() {
     return BeginRun;
   }
   // This means we've read the whole file
-  else if (m_chunkload == NULL) {
+  else if (m_chunkload == nullptr) {
     return EndRun;
   }
   // Otherwise we're in the run
@@ -125,7 +125,7 @@ boost::shared_ptr<Workspace> FileEventDataListener::extractData() {
   // algorithm.
   // This is equivalent to the end of the run - which we still need to figure
   // out how to handle.
-  if (m_chunkload == NULL) {
+  if (m_chunkload == nullptr) {
     throw std::runtime_error("The whole file has been read!");
   }
 
@@ -141,7 +141,7 @@ boost::shared_ptr<Workspace> FileEventDataListener::extractData() {
   AnalysisDataService::Instance().remove(m_tempWSname);
   // Delete the ActiveResult to signify that we're done with it.
   delete m_chunkload;
-  m_chunkload = NULL;
+  m_chunkload = nullptr;
   // Kick off the loading of the next chunk (unless we're at the end of the
   // file)
   if (m_nextChunk <= m_numChunks) {
diff --git a/Framework/LiveData/src/ISISHistoDataListener.cpp b/Framework/LiveData/src/ISISHistoDataListener.cpp
index 53c3ae7833b6c1c07b1c2965068522a893a1a145..545db4f8401bc2cd20e09f846cee3f1d74e640a0 100644
--- a/Framework/LiveData/src/ISISHistoDataListener.cpp
+++ b/Framework/LiveData/src/ISISHistoDataListener.cpp
@@ -44,7 +44,7 @@ Kernel::Logger g_log("ISISHistoDataListener");
 
 /// Constructor
 ISISHistoDataListener::ISISHistoDataListener()
-    : ILiveListener(), isInitilized(false), m_daeHandle(NULL),
+    : ILiveListener(), isInitilized(false), m_daeHandle(nullptr),
       m_numberOfPeriods(0), m_totalNumberOfSpectra(0), m_timeRegime(-1) {
   declareProperty(new Kernel::ArrayProperty<specid_t>("SpectraList"),
                   "An optional list of spectra to load. If blank, all "
@@ -94,7 +94,7 @@ bool ISISHistoDataListener::connect(const Poco::Net::SocketAddress &address) {
   IDCsetreportfunc(&ISISHistoDataListener::IDCReporter);
 
   if (IDCopen(m_daeName.c_str(), 0, 0, &m_daeHandle, address.port()) != 0) {
-    m_daeHandle = NULL;
+    m_daeHandle = nullptr;
     return false;
   }
 
@@ -121,7 +121,7 @@ bool ISISHistoDataListener::connect(const Poco::Net::SocketAddress &address) {
 }
 
 bool ISISHistoDataListener::isConnected() {
-  if (m_daeHandle == NULL)
+  if (m_daeHandle == nullptr)
     return false;
   // try to read a parameter, success means connected
   int sv_dims_array[1] = {1}, sv_ndims = 1, buffer;
diff --git a/Framework/LiveData/src/ISISLiveEventDataListener.cpp b/Framework/LiveData/src/ISISLiveEventDataListener.cpp
index e18ca7752a4db9f9f8615d1cd0d2f4eac6f24fb0..0a6f964f35a0c5f253f9168f7fcaa8aad27ce081 100644
--- a/Framework/LiveData/src/ISISLiveEventDataListener.cpp
+++ b/Framework/LiveData/src/ISISLiveEventDataListener.cpp
@@ -127,7 +127,7 @@ bool ISISLiveEventDataListener::connect(
     retVal = IDCopen(daeName.c_str(), 0, 0, &m_daeHandle);
   }
   if (retVal != 0) {
-    m_daeHandle = NULL;
+    m_daeHandle = nullptr;
     return false;
   }
 
diff --git a/Framework/LiveData/src/LoadDAE/idc.cpp b/Framework/LiveData/src/LoadDAE/idc.cpp
index 9f07b5982d5cd8caee87de995de8f46c73cc1532..c959b0c9026aacfb34864d12e133eff23d8eb9f2 100644
--- a/Framework/LiveData/src/LoadDAE/idc.cpp
+++ b/Framework/LiveData/src/LoadDAE/idc.cpp
@@ -63,7 +63,7 @@ int IDCopen(const char *host, int mode, int options, idc_handle_t *pfh,
   (void)options; // Avoid compiler warning
 
   SOCKET s;
-  *pfh = NULL;
+  *pfh = nullptr;
   s = isisds_send_open(host, ISISDSDAEAccess, port);
   if (s == INVALID_SOCKET) {
     IDCreport(0, 0, "Error accessing DAE");
@@ -77,7 +77,7 @@ int IDCopen(const char *host, int mode, int options, idc_handle_t *pfh,
 int IDCclose(idc_handle_t *pfh) {
   isisds_send_close((*pfh)->s);
   free((*pfh));
-  *pfh = NULL;
+  *pfh = nullptr;
   return 0;
 }
 
@@ -92,7 +92,7 @@ static int getdat(idc_handle_t fh, int ifsn, int nos, int **value,
   ISISDSDataType ret_type;
   int spec_nos[2] = {ifsn, nos};
   int spec_nos_dims[1] = {2};
-  char *command = NULL;
+  char *command = nullptr;
   if (isisds_send_command(fh->s, "GETDAT", spec_nos, ISISDSInt32, spec_nos_dims,
                           1) <= 0) {
     IDCreport(0, 0, "error sending command (getdat)");
@@ -137,7 +137,7 @@ static int IDCgetpar(idc_handle_t fh, const char *name, void **value,
                      int do_alloc) {
   int n, stat, comm_buff_size;
   ISISDSDataType ret_type;
-  char *command = NULL;
+  char *command = nullptr;
   char comm_buffer[256];
   sprintf(comm_buffer, "GETPAR%s", isisds_type_code[type]);
   n = static_cast<int>(strlen(name));
diff --git a/Framework/LiveData/src/LoadDAE/isisds_command.cpp b/Framework/LiveData/src/LoadDAE/isisds_command.cpp
index b54ea2c9781699874f8f7b5c3b9b3cc1ba9209b8..b340faa7f82a2cd3b134b5d210bea39dc485b56d 100644
--- a/Framework/LiveData/src/LoadDAE/isisds_command.cpp
+++ b/Framework/LiveData/src/LoadDAE/isisds_command.cpp
@@ -108,7 +108,7 @@ static void clear_replies(SOCKET s) {
   while (!done) {
     FD_ZERO(&fds);
     FD_SET(s, &fds);
-    if ((select(FD_SETSIZE, &fds, NULL, NULL, &timeout) > 0) &&
+    if ((select(FD_SETSIZE, &fds, nullptr, nullptr, &timeout) > 0) &&
         FD_ISSET(s, &fds)) {
       recv(s, buffer, sizeof(buffer), 0);
     } else {
@@ -133,7 +133,7 @@ SOCKET isisds_send_open(const char *host, ISISDSAccessMode access_type,
   ISISDSDataType data_type;
   int dims_array[10], ndims;
 
-  if ((hostp = gethostbyname(host)) == NULL) {
+  if ((hostp = gethostbyname(host)) == nullptr) {
     return INVALID_SOCKET;
   }
   memset(&address, 0, sizeof(address));
@@ -171,14 +171,14 @@ SOCKET isisds_send_open(const char *host, ISISDSAccessMode access_type,
     closesocket(s);
     return INVALID_SOCKET;
   }
-  comm = NULL;
+  comm = nullptr;
   if (isisds_recv_command_alloc(s, &comm, (void **)&comm_data, &data_type,
                                 dims_array, &ndims) <= 0) {
     closesocket(s);
     free(comm);
     return INVALID_SOCKET;
   }
-  if (comm_data != NULL) {
+  if (comm_data != nullptr) {
     free(comm_data);
   }
   if (!strcmp(comm, "OK")) {
@@ -207,7 +207,7 @@ int isisds_recv_open(SOCKET s, ISISDSAccessMode *access_type) {
     return -1;
   }
   *access_type = (ISISDSAccessMode)op.access_type;
-  return isisds_send_command(s, "OK", NULL, ISISDSUnknown, NULL, 0);
+  return isisds_send_command(s, "OK", nullptr, ISISDSUnknown, nullptr, 0);
 }
 /*
  * return > 0 on success
@@ -226,7 +226,7 @@ int isisds_send_command(SOCKET s, const char *command, const void *data,
   int n, len_data;
   isisds_command_header_t comm;
   memset(&comm, 0, sizeof(comm));
-  if (dims_array == NULL) {
+  if (dims_array == nullptr) {
     comm.ndims = 1;
     comm.dims_array[0] = ndims;
     len_data = ndims * isisds_type_size[type];
@@ -249,7 +249,7 @@ int isisds_send_command(SOCKET s, const char *command, const void *data,
   strncpy(comm.command, command, sizeof(comm.command) - 1);
   clear_replies(s);
   n = send(s, (char *)&comm, sizeof(comm), 0);
-  if ((n == sizeof(comm)) && (data != NULL) && (len_data > 0)) {
+  if ((n == sizeof(comm)) && (data != nullptr) && (len_data > 0)) {
     n = send(s, (const char *)data, len_data, 0);
   }
   return n;
@@ -300,7 +300,7 @@ static int isisds_recv_command_helper(SOCKET s, char **command, void **data,
   n = recv_all(s, *data, len_data, 0);
   if (n != len_data) {
     free(*data);
-    *data = NULL;
+    *data = nullptr;
     len_data = 0;
     return -1;
   }
@@ -323,11 +323,11 @@ int isisds_recv_command(SOCKET s, char *command, int *len_command, void *data,
                         ISISDSDataType *type, int dims_array[], int *ndims) {
   int t_ndims = 1;
   int istat;
-  char *command_temp = NULL;
-  if (type == NULL) {
+  char *command_temp = nullptr;
+  if (type == nullptr) {
     return -1;
   }
-  if (dims_array == NULL || ndims == NULL ||
+  if (dims_array == nullptr || ndims == nullptr ||
       (*ndims <= 1 && dims_array[0] <= 1)) {
     int t_dims[8] = {1, 0, 0, 0, 0, 0, 0, 0};
     /* assume single simple value */
@@ -350,14 +350,14 @@ int isisds_recv_command(SOCKET s, char *command, int *len_command, void *data,
 int isisds_recv_command_alloc(SOCKET s, char **command, void **data,
                               ISISDSDataType *type, int dims_array[],
                               int *ndims) {
-  if (ndims == NULL || dims_array == NULL || type == NULL) {
+  if (ndims == nullptr || dims_array == nullptr || type == nullptr) {
     return -1;
   }
-  if (data == NULL || command == NULL) {
+  if (data == nullptr || command == nullptr) {
     return -1;
   }
-  *data = NULL;
-  *command = NULL;
+  *data = nullptr;
+  *command = nullptr;
   /* *ndims = 0; */
   dims_array[0] = 0;
   *type = ISISDSUnknown;
diff --git a/Framework/LiveData/src/SNSLiveEventDataListener.cpp b/Framework/LiveData/src/SNSLiveEventDataListener.cpp
index 4ea7b4d1f5ad9beee314f709414dc686c9d6974e..47be4adb02ef752934d462ff2e4bc204f25fc6a3 100644
--- a/Framework/LiveData/src/SNSLiveEventDataListener.cpp
+++ b/Framework/LiveData/src/SNSLiveEventDataListener.cpp
@@ -411,7 +411,7 @@ bool SNSLiveEventDataListener::rxPacket(const ADARA::BankedEventPkt &pkt) {
     unsigned lastBankID = pkt.curBankId();
     // A counter that we use for logging purposes
     unsigned eventsPerBank = 0;
-    while (event != NULL) {
+    while (event != nullptr) {
       eventsPerBank++;
       totalEvents++;
       if (lastBankID < 0xFFFFFFFE) // Bank ID -1 & -2 are special cases and are
@@ -1092,7 +1092,7 @@ bool SNSLiveEventDataListener::rxPacket(const ADARA::DeviceDescriptorPkt &pkt) {
           // actual keyword
           // to the template declaration.  Hense all the if...else if...else
           // stuff...
-          Property *prop = NULL;
+          Property *prop = nullptr;
           if (pvType == "double") {
             prop = new TimeSeriesProperty<double>(pvName);
           } else if ((pvType == "integer") || (pvType == "unsigned") ||
diff --git a/Framework/LiveData/src/TOPAZLiveEventDataListener.cpp b/Framework/LiveData/src/TOPAZLiveEventDataListener.cpp
index b58b8ffae1159278da7293635d9bc0e0b9e7ab09..5c8b636b442b9628227c96b5b1841c2871fc9d91 100644
--- a/Framework/LiveData/src/TOPAZLiveEventDataListener.cpp
+++ b/Framework/LiveData/src/TOPAZLiveEventDataListener.cpp
@@ -158,7 +158,7 @@ TOPAZLiveEventDataListener::TOPAZLiveEventDataListener()
     : ILiveListener(), m_workspaceInitialized(false), m_eventBuffer(),
       m_monitorLogs(), m_wsName(), m_indexMap(), m_monitorIndexMap(),
       m_tcpSocket(), m_dataSocket(), m_dataAddr(), m_isConnected(false),
-      m_udpBuf(NULL), m_udpBufSize(32768), m_runNumber(0), m_mutex(),
+      m_udpBuf(nullptr), m_udpBufSize(32768), m_runNumber(0), m_mutex(),
       m_thread(), m_stopThread(false), m_backgroundException() {
 
   m_udpBuf = new unsigned char[m_udpBufSize];
diff --git a/Framework/MDAlgorithms/src/BinMD.cpp b/Framework/MDAlgorithms/src/BinMD.cpp
index b7ae382f0ba8b0f349796797cd6911e43f639847..77eced2e40ac446759c76af8486672d7849f2e98 100644
--- a/Framework/MDAlgorithms/src/BinMD.cpp
+++ b/Framework/MDAlgorithms/src/BinMD.cpp
@@ -35,8 +35,8 @@ using namespace Mantid::DataObjects;
 /** Constructor
  */
 BinMD::BinMD()
-    : outWS(), prog(NULL), implicitFunction(NULL), indexMultiplier(NULL),
-      signals(NULL), errors(NULL), numEvents(NULL) {}
+    : outWS(), prog(nullptr), implicitFunction(nullptr), indexMultiplier(nullptr),
+      signals(nullptr), errors(nullptr), numEvents(nullptr) {}
 
 //----------------------------------------------------------------------------------------------
 /** Destructor
@@ -373,7 +373,7 @@ void BinMD::exec() {
 
   // De serialize the implicit function
   std::string ImplicitFunctionXML = getPropertyValue("ImplicitFunctionXML");
-  implicitFunction = NULL;
+  implicitFunction = nullptr;
   if (!ImplicitFunctionXML.empty())
     implicitFunction =
         Mantid::API::ImplicitFunctionFactory::Instance().createUnwrapped(
diff --git a/Framework/MDAlgorithms/src/ConvToMDEventsWS.cpp b/Framework/MDAlgorithms/src/ConvToMDEventsWS.cpp
index 2dbfbda15da67a8ef212a998aa879f3240eb86d5..f37307581c9d0b5dc0932a54bc8d4bb14c7e378c 100644
--- a/Framework/MDAlgorithms/src/ConvToMDEventsWS.cpp
+++ b/Framework/MDAlgorithms/src/ConvToMDEventsWS.cpp
@@ -125,7 +125,7 @@ void ConvToMDEventsWS::runConversion(API::Progress *pProgress) {
   size_t nValidSpectra = m_NSpectra;
 
   //--->>> Thread control stuff
-  Kernel::ThreadSchedulerFIFO *ts(NULL);
+  Kernel::ThreadSchedulerFIFO *ts(nullptr);
 
   int nThreads(m_NumThreads);
   if (nThreads < 0)
@@ -170,7 +170,7 @@ void ConvToMDEventsWS::runConversion(API::Progress *pProgress) {
           tp.joinAll();
       } else {
         m_OutWSWrapper->pWorkspace()->splitAllIfNeeded(
-            NULL); // it is done this way as it is possible trying to do single
+            nullptr); // it is done this way as it is possible trying to do single
                    // threaded split more efficiently
       }
       // Count the new # of boxes.
@@ -187,7 +187,7 @@ void ConvToMDEventsWS::runConversion(API::Progress *pProgress) {
     m_OutWSWrapper->pWorkspace()->splitAllIfNeeded(ts);
     tp.joinAll();
   } else {
-    m_OutWSWrapper->pWorkspace()->splitAllIfNeeded(NULL);
+    m_OutWSWrapper->pWorkspace()->splitAllIfNeeded(nullptr);
   }
 
   // Recount totals at the end.
diff --git a/Framework/MDAlgorithms/src/ConvToMDHistoWS.cpp b/Framework/MDAlgorithms/src/ConvToMDHistoWS.cpp
index b0e5500f5c3856f393f4d1994c7e5fd897e20a28..fa08c5dcd099eef627d4719a7b12f362cad72f8c 100644
--- a/Framework/MDAlgorithms/src/ConvToMDHistoWS.cpp
+++ b/Framework/MDAlgorithms/src/ConvToMDHistoWS.cpp
@@ -178,7 +178,7 @@ void ConvToMDHistoWS::runConversion(API::Progress *pProgress) {
     return;
 
   //--->>> Thread control stuff
-  Kernel::ThreadSchedulerFIFO *ts(NULL);
+  Kernel::ThreadSchedulerFIFO *ts(nullptr);
   int nThreads(m_NumThreads);
   if (nThreads < 0)
     nThreads = 0; // negative m_NumThreads correspond to all cores used, 0 no
@@ -222,7 +222,7 @@ void ConvToMDHistoWS::runConversion(API::Progress *pProgress) {
           tp.joinAll();
       } else {
         m_OutWSWrapper->pWorkspace()->splitAllIfNeeded(
-            NULL); // it is done this way as it is possible trying to do single
+            nullptr); // it is done this way as it is possible trying to do single
                    // threaded split more efficiently
       }
       // Count the new # of boxes.
@@ -251,7 +251,7 @@ void ConvToMDHistoWS::runConversion(API::Progress *pProgress) {
     m_OutWSWrapper->pWorkspace()->splitAllIfNeeded(ts);
     tp.joinAll();
   } else {
-    m_OutWSWrapper->pWorkspace()->splitAllIfNeeded(NULL);
+    m_OutWSWrapper->pWorkspace()->splitAllIfNeeded(nullptr);
   }
   m_OutWSWrapper->pWorkspace()->refreshCache();
   // m_OutWSWrapper->refreshCentroid();
diff --git a/Framework/MDAlgorithms/src/ConvertCWSDExpToMomentum.cpp b/Framework/MDAlgorithms/src/ConvertCWSDExpToMomentum.cpp
index 746eb498bc4ad870cb81ff6452f4c2cce3ab69e5..1257931557da32aaa26e8dad6232d73b6c622d0d 100644
--- a/Framework/MDAlgorithms/src/ConvertCWSDExpToMomentum.cpp
+++ b/Framework/MDAlgorithms/src/ConvertCWSDExpToMomentum.cpp
@@ -280,7 +280,7 @@ void ConvertCWSDExpToMomentum::addMDEvents(bool usevirtual) {
         throw std::runtime_error("Unable to cast to MDBox");
       mdbox->setExtents(dim, -10, 10);
       mdbox->calcVolume();
-      mdbox->refreshCache(NULL);
+      mdbox->refreshCache(nullptr);
     }
   }
 
diff --git a/Framework/MDAlgorithms/src/ConvertToDiffractionMDWorkspace.cpp b/Framework/MDAlgorithms/src/ConvertToDiffractionMDWorkspace.cpp
index 2c839eee383f057731af43d98907f94097c2fe8b..59c9f9a9aba4ae9e28310d971c7b9e778f321c98 100644
--- a/Framework/MDAlgorithms/src/ConvertToDiffractionMDWorkspace.cpp
+++ b/Framework/MDAlgorithms/src/ConvertToDiffractionMDWorkspace.cpp
@@ -43,8 +43,8 @@ ConvertToDiffractionMDWorkspace::ConvertToDiffractionMDWorkspace()
       Append(true), // append data to existing target MD workspace if one exist
       LorentzCorrection(false), // not doing Lorents
       l1(1.), beamline_norm(1.), failedDetectorLookupCount(0),
-      m_extentsMin(NULL),
-      m_extentsMax(NULL) // will be allocated in exec using nDims
+      m_extentsMin(nullptr),
+      m_extentsMax(nullptr) // will be allocated in exec using nDims
 {}
 
 //----------------------------------------------------------------------------------------------
diff --git a/Framework/MDAlgorithms/src/DivideMD.cpp b/Framework/MDAlgorithms/src/DivideMD.cpp
index 23c762fcd57067b0889ac3b13bcdad8c95b44d36..5137a692ebedbaa07e07e53fc854eae1d23f941f 100644
--- a/Framework/MDAlgorithms/src/DivideMD.cpp
+++ b/Framework/MDAlgorithms/src/DivideMD.cpp
@@ -67,7 +67,7 @@ void DivideMD::execEventScalar(typename MDEventWorkspace<MDE, nd>::sptr ws) {
   parentBox->getBoxes(boxes, 1000, true);
 
   bool fileBackedTarget(false);
-  Kernel::DiskBuffer *dbuff(NULL);
+  Kernel::DiskBuffer *dbuff(nullptr);
   if (ws->isFileBacked()) {
     fileBackedTarget = true;
     dbuff = ws->getBoxController()->getFileIO();
diff --git a/Framework/MDAlgorithms/src/FindPeaksMD.cpp b/Framework/MDAlgorithms/src/FindPeaksMD.cpp
index 5f26a22c472e57a7aba84ff4b55a8bf8e5674d42..2e8e9069bd1c0d4b0c203032608936c63441ee15 100644
--- a/Framework/MDAlgorithms/src/FindPeaksMD.cpp
+++ b/Framework/MDAlgorithms/src/FindPeaksMD.cpp
@@ -107,7 +107,7 @@ DECLARE_ALGORITHM(FindPeaksMD)
  */
 FindPeaksMD::FindPeaksMD()
     : peakWS(), peakRadiusSquared(), DensityThresholdFactor(0.0), m_maxPeaks(0),
-      m_addDetectors(true), m_densityScaleFactor(1e-6), prog(NULL), inst(),
+      m_addDetectors(true), m_densityScaleFactor(1e-6), prog(nullptr), inst(),
       m_runNumber(-1), dimType(), m_goniometer() {}
 
 //----------------------------------------------------------------------------------------------
diff --git a/Framework/MDAlgorithms/src/FitMD.cpp b/Framework/MDAlgorithms/src/FitMD.cpp
index 3f411bbc0d63d5fb3c36ec8f6b5b9133549f5485..4f9d9c0bb7a17a49043b3dee241322fdd56ed9e5 100644
--- a/Framework/MDAlgorithms/src/FitMD.cpp
+++ b/Framework/MDAlgorithms/src/FitMD.cpp
@@ -33,7 +33,7 @@ using namespace Kernel;
  * Default Constructor
  */
 FitMD::FitMD()
-    : API::IDomainCreator(NULL, std::vector<std::string>(),
+    : API::IDomainCreator(nullptr, std::vector<std::string>(),
                           IDomainCreator::Simple),
       m_maxSize(0), m_startIndex(0), m_count(0) {}
 
diff --git a/Framework/MDAlgorithms/src/IntegrateFlux.cpp b/Framework/MDAlgorithms/src/IntegrateFlux.cpp
index 056c90c3be403f57e9b7daef9022864cc43675f4..982be8f94a8d012d1e703f35041f7a84bcba5b44 100644
--- a/Framework/MDAlgorithms/src/IntegrateFlux.cpp
+++ b/Framework/MDAlgorithms/src/IntegrateFlux.cpp
@@ -170,7 +170,7 @@ template <class EventType>
 void IntegrateFlux::integrateSpectraEvents(
     const DataObjects::EventWorkspace &inputWS,
     API::MatrixWorkspace &integrWS) const {
-  inputWS.sortAll(DataObjects::TOF_SORT, NULL);
+  inputWS.sortAll(DataObjects::TOF_SORT, nullptr);
   size_t nSpec = inputWS.getNumberHistograms();
   assert(nSpec == integrWS.getNumberHistograms());
 
diff --git a/Framework/MDAlgorithms/src/IntegrateMDHistoWorkspace.cpp b/Framework/MDAlgorithms/src/IntegrateMDHistoWorkspace.cpp
index 0557a9a29dfe8e18cf489ac79eb7a7412cbd4eca..4c1ca11b572b613dff727a0e54c47d9a439bd1f6 100644
--- a/Framework/MDAlgorithms/src/IntegrateMDHistoWorkspace.cpp
+++ b/Framework/MDAlgorithms/src/IntegrateMDHistoWorkspace.cpp
@@ -352,7 +352,7 @@ void IntegrateMDHistoWorkspace::exec() {
     const int nThreads = Mantid::API::FrameworkManager::Instance()
                              .getNumOMPThreads(); // NThreads to Request
 
-    auto outIterators = outWS->createIterators(nThreads, NULL);
+    auto outIterators = outWS->createIterators(nThreads, nullptr);
 
     PARALLEL_FOR_NO_WSP_CHECK()
     for (int i = 0; i < int(outIterators.size()); ++i) {
diff --git a/Framework/MDAlgorithms/src/LoadMD.cpp b/Framework/MDAlgorithms/src/LoadMD.cpp
index 37726c4a957d9604d53fc96f044eccc8449f981e..4d4c8dacea1b397d4f067a3601b109172b151858 100644
--- a/Framework/MDAlgorithms/src/LoadMD.cpp
+++ b/Framework/MDAlgorithms/src/LoadMD.cpp
@@ -603,7 +603,7 @@ CoordTransform *LoadMD::loadAffineMatrix(std::string entry_name) {
   inD--;
   outD--;
   Matrix<coord_t> mat(vec);
-  CoordTransform *transform = NULL;
+  CoordTransform *transform = nullptr;
   if (("CoordTransformAffine" == type) || ("CoordTransformAligned" == type)) {
     auto affine = new CoordTransformAffine(inD, outD);
     affine->setMatrix(mat);
diff --git a/Framework/MDAlgorithms/src/LoadSQW.cpp b/Framework/MDAlgorithms/src/LoadSQW.cpp
index e0beda7bcb671c9e9af7b54ef84ca0e0e5174b94..a8fb514051179a4db70fc31f5221d3d7a772f4d8 100644
--- a/Framework/MDAlgorithms/src/LoadSQW.cpp
+++ b/Framework/MDAlgorithms/src/LoadSQW.cpp
@@ -243,7 +243,7 @@ void LoadSQW::readEvents(
   // For tracking when to split boxes
   size_t eventsAdded = 0;
   BoxController_sptr bc = ws->getBoxController();
-  DiskBuffer *dbuf(NULL);
+  DiskBuffer *dbuf(nullptr);
   if (bc->isFileBacked())
     dbuf = bc->getFileIO();
 
diff --git a/Framework/MDAlgorithms/src/MDEventWSWrapper.cpp b/Framework/MDAlgorithms/src/MDEventWSWrapper.cpp
index f288262e3067891cc48ba147582667dd4a901318..e09eab7fbc23fc08b93ffc8cdc1c2112ca8c4894 100644
--- a/Framework/MDAlgorithms/src/MDEventWSWrapper.cpp
+++ b/Framework/MDAlgorithms/src/MDEventWSWrapper.cpp
@@ -27,7 +27,7 @@ void MDEventWSWrapper::createEmptyEventWS(const MDWSDescription &description) {
     if (!numBins.empty())
       nBins = numBins[d];
 
-    Geometry::MDHistoDimension *dim = NULL;
+    Geometry::MDHistoDimension *dim = nullptr;
     if (d < 3 && description.isQ3DMode()) {
       // We should have frame and scale information that we can use correctly
       // for our Q dimensions.
diff --git a/Framework/MDAlgorithms/src/MDNormDirectSC.cpp b/Framework/MDAlgorithms/src/MDNormDirectSC.cpp
index efc710413ea131fd80af16c803aac3de848021df..f676e597286a82c5dcb2784a18cd8fbb05d5bb36 100644
--- a/Framework/MDAlgorithms/src/MDNormDirectSC.cpp
+++ b/Framework/MDAlgorithms/src/MDNormDirectSC.cpp
@@ -155,7 +155,7 @@ void MDNormDirectSC::cacheInputs() {
   const auto &exptInfoZero = *(m_inputWS->getExperimentInfo(0));
   auto source = exptInfoZero.getInstrument()->getSource();
   auto sample = exptInfoZero.getInstrument()->getSample();
-  if (source == NULL || sample == NULL) {
+  if (source == nullptr || sample == nullptr) {
     throw Kernel::Exception::InstrumentDefinitionError(
         "Instrument not sufficiently defined: failed to get source and/or "
         "sample");
@@ -449,7 +449,7 @@ void MDNormDirectSC::calculateNormalization(
   API::MatrixWorkspace_const_sptr solidAngleWS =
       getProperty("SolidAngleWorkspace");
   detid2index_map solidAngDetToIdx;
-  if (solidAngleWS != NULL) {
+  if (solidAngleWS != nullptr) {
     haveSA = true;
     solidAngDetToIdx = solidAngleWS->getDetectorIDToWorkspaceIndexMap();
   }
diff --git a/Framework/MDAlgorithms/src/MDNormSCD.cpp b/Framework/MDAlgorithms/src/MDNormSCD.cpp
index 665807725fa4ce720c79046990b032f45b559e0e..cd52b0c7a496940f318b2211791279c0cfe878bc 100644
--- a/Framework/MDAlgorithms/src/MDNormSCD.cpp
+++ b/Framework/MDAlgorithms/src/MDNormSCD.cpp
@@ -155,7 +155,7 @@ void MDNormSCD::cacheInputs() {
   const auto &exptInfoZero = *(m_inputWS->getExperimentInfo(0));
   auto source = exptInfoZero.getInstrument()->getSource();
   auto sample = exptInfoZero.getInstrument()->getSample();
-  if (source == NULL || sample == NULL) {
+  if (source == nullptr || sample == nullptr) {
     throw Kernel::Exception::InstrumentDefinitionError(
         "Instrument not sufficiently defined: failed to get source and/or "
         "sample");
diff --git a/Framework/MDAlgorithms/src/MDTransfModQ.cpp b/Framework/MDAlgorithms/src/MDTransfModQ.cpp
index d253d3ab12bb502f6089ae4bc3a550cfb01a28d8..197acc853fc35fc63177438f7f4124a4beddf4c8 100644
--- a/Framework/MDAlgorithms/src/MDTransfModQ.cpp
+++ b/Framework/MDAlgorithms/src/MDTransfModQ.cpp
@@ -278,7 +278,7 @@ void MDTransfModQ::initialize(const MDWSDescription &ConvParams) {
   //   pHost      = &Conv;
   // get transformation matrix (needed for CrystalAsPoder mode)
   m_RotMat = ConvParams.getTransfMatrix();
-  m_pEfixedArray = NULL;
+  m_pEfixedArray = nullptr;
   if (!ConvParams.m_PreprDetTable)
     throw(std::runtime_error("The detectors have not been preprocessed but "
                              "they have to before running initialize"));
@@ -333,7 +333,7 @@ void MDTransfModQ::initialize(const MDWSDescription &ConvParams) {
     // the wave vector of incident neutrons;
     m_Ki = sqrt(m_Ei / PhysicalConstants::E_mev_toNeutronWavenumberSq);
 
-    m_pEfixedArray = NULL;
+    m_pEfixedArray = nullptr;
     if (m_Emode == (int)Kernel::DeltaEMode::Indirect)
       m_pEfixedArray =
           ConvParams.m_PreprDetTable->getColDataArray<float>("eFixed");
@@ -402,10 +402,10 @@ MDTransfModQ::outputUnitID(Kernel::DeltaEMode::Type dEmode,
 
 /// constructor;
 MDTransfModQ::MDTransfModQ()
-    : m_ex(0), m_ey(0), m_ez(1), m_DetDirecton(NULL), //,m_NMatrixDim(-1)
+    : m_ex(0), m_ey(0), m_ez(1), m_DetDirecton(nullptr), //,m_NMatrixDim(-1)
       m_NMatrixDim(0),                                // uninitialized
       m_Emode(Kernel::DeltaEMode::Undefined),         // uninitialized
-      m_Ki(1.), m_Ei(1.), m_pEfixedArray(NULL), m_pDetMasks(NULL) {}
+      m_Ki(1.), m_Ei(1.), m_pEfixedArray(nullptr), m_pDetMasks(nullptr) {}
 
 std::vector<std::string> MDTransfModQ::getEmodes() const {
   return Kernel::DeltaEMode::availableTypes();
diff --git a/Framework/MDAlgorithms/src/MDTransfNoQ.cpp b/Framework/MDAlgorithms/src/MDTransfNoQ.cpp
index bf5f87c63855e6ffbfcd5278f30042bd349a95b7..00b5e1d76f1ae073dc006c3dd553b90632a6940a 100644
--- a/Framework/MDAlgorithms/src/MDTransfNoQ.cpp
+++ b/Framework/MDAlgorithms/src/MDTransfNoQ.cpp
@@ -180,7 +180,7 @@ MDTransfNoQ::inputUnitID(Kernel::DeltaEMode::Type mode,
   return pXAxis->unit()->unitID();
 }
 
-MDTransfNoQ::MDTransfNoQ() : m_NMatrixDim(0), m_YAxis(NULL), m_Det(NULL) {}
+MDTransfNoQ::MDTransfNoQ() : m_NMatrixDim(0), m_YAxis(nullptr), m_Det(nullptr) {}
 
 /**
  * Set the display normalization for no Q
diff --git a/Framework/MDAlgorithms/src/MDTransfQ3D.cpp b/Framework/MDAlgorithms/src/MDTransfQ3D.cpp
index 3a79ff96bc4584f006cd49ae3803944af1e2ac36..cce7eb189832810ff88f5b35ef12a69ecb5f1995 100644
--- a/Framework/MDAlgorithms/src/MDTransfQ3D.cpp
+++ b/Framework/MDAlgorithms/src/MDTransfQ3D.cpp
@@ -193,8 +193,8 @@ bool MDTransfQ3D::calcYDepCoordinates(std::vector<coord_t> &Coord, size_t i) {
 /** function initalizes all variables necessary for converting workspace
  * variables into MD variables in ModQ (elastic/inelastic) cases  */
 void MDTransfQ3D::initialize(const MDWSDescription &ConvParams) {
-  m_pEfixedArray = NULL;
-  m_pDetMasks = NULL;
+  m_pEfixedArray = nullptr;
+  m_pDetMasks = nullptr;
   //********** Generic part of initialization, common for elastic and inelastic
   // modes:
   // get transformation matrix (needed for CrystalAsPoder mode)
@@ -225,7 +225,7 @@ void MDTransfQ3D::initialize(const MDWSDescription &ConvParams) {
     // the wave vector of incident neutrons;
     m_Ki = sqrt(m_Ei / PhysicalConstants::E_mev_toNeutronWavenumberSq);
 
-    m_pEfixedArray = NULL;
+    m_pEfixedArray = nullptr;
     if (m_Emode == (int)Kernel::DeltaEMode::Indirect)
       m_pEfixedArray =
           ConvParams.m_PreprDetTable->getColDataArray<float>("eFixed");
@@ -318,7 +318,7 @@ MDTransfQ3D::outputUnitID(Kernel::DeltaEMode::Type dEmode,
 
 /// constructor;
 MDTransfQ3D::MDTransfQ3D()
-    : m_isLorentzCorrected(false), m_SinThetaSqArray(NULL), SinThetaSq(),
+    : m_isLorentzCorrected(false), m_SinThetaSqArray(nullptr), SinThetaSq(),
       m_SinThetaSq(0.), m_AbsMin(0.) {}
 
 } // End MDAlgorighms namespace
diff --git a/Framework/MDAlgorithms/src/MergeMD.cpp b/Framework/MDAlgorithms/src/MergeMD.cpp
index 5965871db3af61c45055b4aabcdbaa51e02b12de..605e994e46d5c044e3c60753e0da74dc3ee4c4b7 100644
--- a/Framework/MDAlgorithms/src/MergeMD.cpp
+++ b/Framework/MDAlgorithms/src/MergeMD.cpp
@@ -218,7 +218,7 @@ void MergeMD::doPlus(typename MDEventWorkspace<MDE, nd>::sptr ws) {
     PARALLEL_CHECK_INTERUPT_REGION
 
     // Progress * prog2 = new Progress(this, 0.4, 0.9, 100);
-    Progress *prog2 = NULL;
+    Progress *prog2 = nullptr;
     ThreadScheduler *ts = new ThreadSchedulerFIFO();
     ThreadPool tp(ts, 0, prog2);
     ws1->splitAllIfNeeded(ts);
diff --git a/Framework/MDAlgorithms/src/MergeMDFiles.cpp b/Framework/MDAlgorithms/src/MergeMDFiles.cpp
index 052b710d6aac8926929fa4a23ca54e3f739439a6..a82b54e006d64d7be141f0ea2ba18c72ad138470 100644
--- a/Framework/MDAlgorithms/src/MergeMDFiles.cpp
+++ b/Framework/MDAlgorithms/src/MergeMDFiles.cpp
@@ -28,7 +28,7 @@ DECLARE_ALGORITHM(MergeMDFiles)
 MergeMDFiles::MergeMDFiles()
     : m_nDims(0), m_MDEventType(), m_fileBasedTargetWS(false), m_Filenames(),
       m_EventLoader(), m_OutIWS(), totalEvents(0), totalLoaded(0), fileMutex(),
-      statsMutex(), prog(NULL) {}
+      statsMutex(), prog(nullptr) {}
 
 //----------------------------------------------------------------------------------------------
 /** Destructor
@@ -77,7 +77,7 @@ void MergeMDFiles::loadBoxData() {
   totalEvents = 0;
 
   m_fileComponentsStructure.resize(m_Filenames.size());
-  m_EventLoader.assign(m_Filenames.size(), NULL);
+  m_EventLoader.assign(m_Filenames.size(), nullptr);
 
   try {
     for (size_t i = 0; i < m_Filenames.size(); i++) {
@@ -242,7 +242,7 @@ void MergeMDFiles::doExecByCloning(Mantid::API::IMDEventWorkspace_sptr ws,
   auto ts = new ThreadSchedulerFIFO();
   ThreadPool tp(ts);
 
-  Kernel::DiskBuffer *DiskBuf(NULL);
+  Kernel::DiskBuffer *DiskBuf(nullptr);
   if (m_fileBasedTargetWS) {
     DiskBuf = bc->getFileIO();
   }
@@ -402,7 +402,7 @@ void MergeMDFiles::clearEventLoaders() {
   for (size_t i = 0; i < m_EventLoader.size(); i++) {
     if (m_EventLoader[i]) {
       delete m_EventLoader[i];
-      m_EventLoader[i] = NULL;
+      m_EventLoader[i] = nullptr;
     }
   }
 }
diff --git a/Framework/MDAlgorithms/src/MultiplyMD.cpp b/Framework/MDAlgorithms/src/MultiplyMD.cpp
index c9352192194e4a1b8d52a1e4f07de47a4c152438..9d2037843e74cf104cac3ef7d55d01023f3732dc 100644
--- a/Framework/MDAlgorithms/src/MultiplyMD.cpp
+++ b/Framework/MDAlgorithms/src/MultiplyMD.cpp
@@ -68,7 +68,7 @@ void MultiplyMD::execEventScalar(typename MDEventWorkspace<MDE, nd>::sptr ws) {
   parentBox->getBoxes(boxes, 1000, true);
 
   bool fileBackedTarget(false);
-  Kernel::DiskBuffer *dbuff(NULL);
+  Kernel::DiskBuffer *dbuff(nullptr);
   if (ws->isFileBacked()) {
     fileBackedTarget = true;
     dbuff = ws->getBoxController()->getFileIO();
diff --git a/Framework/MDAlgorithms/src/PreprocessDetectorsToMD.cpp b/Framework/MDAlgorithms/src/PreprocessDetectorsToMD.cpp
index c3aa0a51f81f48e0ed42730b7d8ef8a14a1f45b3..209cc439c2e38686a8c16de4ecb724add5d584cf 100644
--- a/Framework/MDAlgorithms/src/PreprocessDetectorsToMD.cpp
+++ b/Framework/MDAlgorithms/src/PreprocessDetectorsToMD.cpp
@@ -223,13 +223,13 @@ void PreprocessDetectorsToMD::processDetectorsPositions(
 
   // Efixed; do we need one and does one exist?
   double Efi = targWS->getLogs()->getPropertyValueAsType<double>("Ei");
-  float *pEfixedArray(NULL);
+  float *pEfixedArray(nullptr);
   const Geometry::ParameterMap &pmap = inputWS->constInstrumentParameters();
   if (m_getEFixed)
     pEfixedArray = targWS->getColDataArray<float>("eFixed");
 
   // check if one needs to generate masked detectors column.
-  int *pMasksArray(NULL);
+  int *pMasksArray(nullptr);
   if (m_getIsMasked)
     pMasksArray = targWS->getColDataArray<int>("detMask");
 
diff --git a/Framework/MDAlgorithms/src/Quantification/CachedExperimentInfo.cpp b/Framework/MDAlgorithms/src/Quantification/CachedExperimentInfo.cpp
index 618b255e989d9d7a7fc9a4be3f7d27cce701ba47..fb8d7ffd3855d644c71a0e690ba54103f76377ac 100644
--- a/Framework/MDAlgorithms/src/Quantification/CachedExperimentInfo.cpp
+++ b/Framework/MDAlgorithms/src/Quantification/CachedExperimentInfo.cpp
@@ -22,7 +22,7 @@ CachedExperimentInfo::CachedExperimentInfo(const API::ExperimentInfo &exptInfo,
       m_modToChop(0.0), m_apertureToChop(0.0), m_chopToSample(0.0),
       m_sampleToDet(0.0), m_beam(Geometry::Z), m_up(Geometry::Y),
       m_horiz(Geometry::X), m_apertureSize(0.0, 0.0), m_sampleWidths(),
-      m_detBox(), m_gonimeter(NULL), m_sampleToDetMatrix(0, 0) {
+      m_detBox(), m_gonimeter(nullptr), m_sampleToDetMatrix(0, 0) {
   Instrument_const_sptr instrument = exptInfo.getInstrument();
   initCaches(instrument, detID);
 }
diff --git a/Framework/MDAlgorithms/src/Quantification/ForegroundModel.cpp b/Framework/MDAlgorithms/src/Quantification/ForegroundModel.cpp
index 4b9ab0025594db189a7a15534e653f1fe62d8115..3655083df19b90ffac2cc432dca5b8245c21a095 100644
--- a/Framework/MDAlgorithms/src/Quantification/ForegroundModel.cpp
+++ b/Framework/MDAlgorithms/src/Quantification/ForegroundModel.cpp
@@ -18,8 +18,8 @@ const char *FORM_FACTOR_ION = "FormFactorIon";
  * Default constructor only callable by the factory
  */
 ForegroundModel::ForegroundModel()
-    : API::ParamFunction(), m_fittingFunction(NULL), m_parOffset(0),
-      m_MagIonName(""), m_formFactorTable(NULL) {
+    : API::ParamFunction(), m_fittingFunction(nullptr), m_parOffset(0),
+      m_MagIonName(""), m_formFactorTable(nullptr) {
   addAttributes();
   setFormFactorIon("0"); // Off
 }
@@ -29,8 +29,8 @@ ForegroundModel::ForegroundModel()
  * @param fittingFunction :: A reference to the fitting function
  */
 ForegroundModel::ForegroundModel(const API::IFunction &fittingFunction)
-    : API::ParamFunction(), m_fittingFunction(NULL), m_parOffset(0),
-      m_formFactorTable(NULL) {
+    : API::ParamFunction(), m_fittingFunction(nullptr), m_parOffset(0),
+      m_formFactorTable(nullptr) {
   addAttributes();
   setFormFactorIon("0"); // Off
   setFunctionUnderMinimization(fittingFunction);
@@ -130,7 +130,7 @@ void ForegroundModel::setFormFactorIon(const std::string &ionType) {
   // "0" indicates off
   if (ionType == "0") {
     delete m_formFactorTable;
-    m_formFactorTable = NULL;
+    m_formFactorTable = nullptr;
   } else {
     using namespace PhysicalConstants;
     if (m_MagIonName != ionType) {
diff --git a/Framework/MDAlgorithms/src/Quantification/MDResolutionConvolution.cpp b/Framework/MDAlgorithms/src/Quantification/MDResolutionConvolution.cpp
index 911d35f858fdf8e6cfc8e001ca6d7f6a0393d12b..7e78d75f74e0d72fa7cc14582b9e7c39c3589506 100644
--- a/Framework/MDAlgorithms/src/Quantification/MDResolutionConvolution.cpp
+++ b/Framework/MDAlgorithms/src/Quantification/MDResolutionConvolution.cpp
@@ -9,7 +9,7 @@ namespace Mantid {
 namespace MDAlgorithms {
 /// Default constructor required by the factory
 MDResolutionConvolution::MDResolutionConvolution()
-    : ParamFunction(), m_fittingFunction(NULL), m_foreground(NULL) {}
+    : ParamFunction(), m_fittingFunction(nullptr), m_foreground(nullptr) {}
 
 /**
  * Construct the object with a ForegroundModel & resolution the function being
@@ -21,7 +21,7 @@ MDResolutionConvolution::MDResolutionConvolution()
  */
 MDResolutionConvolution::MDResolutionConvolution(
     const API::IFunctionMD &fittingFunction, const std::string &fgModelName)
-    : ParamFunction(), m_fittingFunction(NULL), m_foreground(NULL) {
+    : ParamFunction(), m_fittingFunction(nullptr), m_foreground(nullptr) {
   setFittingFunction(fittingFunction);
   setForegroundModel(fgModelName);
 }
diff --git a/Framework/MDAlgorithms/src/Quantification/Resolution/TobyFitResolutionModel.cpp b/Framework/MDAlgorithms/src/Quantification/Resolution/TobyFitResolutionModel.cpp
index 2e046ad19f749acd6bd68f0caca7028a4f4bcda8..f2ff2581fd2f73f8a13ce3fa9c8edf3340b7cbaa 100644
--- a/Framework/MDAlgorithms/src/Quantification/Resolution/TobyFitResolutionModel.cpp
+++ b/Framework/MDAlgorithms/src/Quantification/Resolution/TobyFitResolutionModel.cpp
@@ -44,7 +44,7 @@ Kernel::Logger g_log("TobyFitResolutionModel");
  * Default constructor
  */
 TobyFitResolutionModel::TobyFitResolutionModel()
-    : MDResolutionConvolution(), m_randomNumbers(1, NULL), m_mcLoopMin(100),
+    : MDResolutionConvolution(), m_randomNumbers(1, nullptr), m_mcLoopMin(100),
       m_mcLoopMax(1000), m_mcType(4), m_mcRelErrorTol(1e-5),
       m_foregroundOnly(false), m_mosaicActive(true), m_bmatrix(1), m_yvector(1),
       m_etaInPlane(1, 0.0), m_etaOutPlane(1, 0.0),
@@ -60,7 +60,7 @@ TobyFitResolutionModel::TobyFitResolutionModel()
 TobyFitResolutionModel::TobyFitResolutionModel(
     const API::IFunctionMD &fittedFunction, const std::string &fgModel)
     : MDResolutionConvolution(fittedFunction, fgModel),
-      m_randomNumbers(1, NULL), m_mcLoopMin(100), m_mcLoopMax(1000),
+      m_randomNumbers(1, nullptr), m_mcLoopMin(100), m_mcLoopMax(1000),
       m_mcType(4), m_mcRelErrorTol(1e-5), m_foregroundOnly(false),
       m_mosaicActive(true), m_bmatrix(1), m_yvector(1), m_etaInPlane(1, 0.0),
       m_etaOutPlane(1, 0.0), m_deltaQE(1, std::vector<double>(4, 0.0)),
@@ -548,7 +548,7 @@ void TobyFitResolutionModel::setNThreads(int nthreads) {
     return; // done on construction
 
   m_randomNumbers =
-      std::vector<Kernel::NDRandomNumberGenerator *>(nthreads, NULL);
+      std::vector<Kernel::NDRandomNumberGenerator *>(nthreads, nullptr);
   m_bmatrix = std::vector<TobyFitBMatrix>(
       nthreads, m_bmatrix[0]); // Initialize with copy of current
   m_yvector = std::vector<TobyFitYVector>(nthreads, m_yvector[0]);
diff --git a/Framework/MDAlgorithms/src/Quantification/Resolution/TobyFitYVector.cpp b/Framework/MDAlgorithms/src/Quantification/Resolution/TobyFitYVector.cpp
index d3da277c6dff4ab52cbd0ec5bb866ae165558ffa..c6e8346f3810726b28e10e7057e5d385549221f8 100644
--- a/Framework/MDAlgorithms/src/Quantification/Resolution/TobyFitYVector.cpp
+++ b/Framework/MDAlgorithms/src/Quantification/Resolution/TobyFitYVector.cpp
@@ -28,8 +28,8 @@ unsigned int TobyFitYVector::length() { return 11; }
  *  Construct a Y vector for the current set up.
  */
 TobyFitYVector::TobyFitYVector()
-    : m_yvector(length(), 0.0), m_curRandNums(NULL), m_randIndex(0),
-      m_curObs(NULL), m_curQOmega(NULL), m_moderator(true), m_aperture(true),
+    : m_yvector(length(), 0.0), m_curRandNums(nullptr), m_randIndex(0),
+      m_curObs(nullptr), m_curQOmega(nullptr), m_moderator(true), m_aperture(true),
       m_chopper(true), m_chopperJitter(true), m_sampleVolume(true),
       m_detectorDepth(true), m_detectorArea(true), m_detectionTime(true) {}
 
@@ -148,10 +148,10 @@ size_t TobyFitYVector::recalculate(const std::vector<double> &randomNums,
   calculateTimeBinContribution();
   size_t randUsed = m_randIndex;
 
-  m_curRandNums = NULL;
+  m_curRandNums = nullptr;
   m_randIndex = 0;
-  m_curObs = NULL;
-  m_curQOmega = NULL;
+  m_curObs = nullptr;
+  m_curQOmega = nullptr;
 
   return randUsed;
 }
diff --git a/Framework/MDAlgorithms/src/Quantification/ResolutionConvolvedCrossSection.cpp b/Framework/MDAlgorithms/src/Quantification/ResolutionConvolvedCrossSection.cpp
index dddeb6e4a76bb009a036ef7b0f824b5e10e82b12..cfc787c852a157b2787b45b60fb72cf8d1e2213e 100644
--- a/Framework/MDAlgorithms/src/Quantification/ResolutionConvolvedCrossSection.cpp
+++ b/Framework/MDAlgorithms/src/Quantification/ResolutionConvolvedCrossSection.cpp
@@ -67,7 +67,7 @@ Kernel::Logger g_log("ResolutionConvolvedCrossSection");
  * Constructor
  */
 ResolutionConvolvedCrossSection::ResolutionConvolvedCrossSection()
-    : ParamFunction(), IFunctionMD(), m_simulation(false), m_convolution(NULL),
+    : ParamFunction(), IFunctionMD(), m_simulation(false), m_convolution(nullptr),
       m_inputWS() {}
 
 /**
diff --git a/Framework/MDAlgorithms/src/ReplicateMD.cpp b/Framework/MDAlgorithms/src/ReplicateMD.cpp
index 340f280f2be73d7d0c4505096f3067d8e57d3802..85be2db79025f35a45a293628d28e3b781e02e55 100644
--- a/Framework/MDAlgorithms/src/ReplicateMD.cpp
+++ b/Framework/MDAlgorithms/src/ReplicateMD.cpp
@@ -326,7 +326,7 @@ void ReplicateMD::exec() {
                            .getNumOMPThreads(); // NThreads to Request
 
   // collection of iterators
-  auto iterators = outputWS->createIterators(nThreads, NULL);
+  auto iterators = outputWS->createIterators(nThreads, nullptr);
 
   PARALLEL_FOR_NO_WSP_CHECK()
   for (int it = 0; it < int(iterators.size()); ++it) {
diff --git a/Framework/MDAlgorithms/src/SliceMD.cpp b/Framework/MDAlgorithms/src/SliceMD.cpp
index ae371f90a4f832269c7f7477923d27665df0bf6b..af305a7a0e626d7dfe1fa47c59bfa51cad0b2940 100644
--- a/Framework/MDAlgorithms/src/SliceMD.cpp
+++ b/Framework/MDAlgorithms/src/SliceMD.cpp
@@ -185,7 +185,7 @@ void SliceMD::slice(typename MDEventWorkspace<MDE, nd>::sptr ws) {
 
   // Function defining which events (in the input dimensions) to place in the
   // output
-  MDImplicitFunction *function = this->getImplicitFunctionForChunk(NULL, NULL);
+  MDImplicitFunction *function = this->getImplicitFunctionForChunk(nullptr, nullptr);
 
   std::vector<API::IMDNode *> boxes;
   // Leaf-only; no depth limit; with the implicit function passed to it.
@@ -262,7 +262,7 @@ void SliceMD::slice(typename MDEventWorkspace<MDE, nd>::sptr ws) {
   } // for each box in the vector
   prog->report();
 
-  outWS->splitAllIfNeeded(NULL);
+  outWS->splitAllIfNeeded(nullptr);
   // Refresh all cache.
   outWS->refreshCache();
 
diff --git a/Framework/MDAlgorithms/src/SlicingAlgorithm.cpp b/Framework/MDAlgorithms/src/SlicingAlgorithm.cpp
index f444e2555b3dd90dd3d2b722bb71a45411352e68..b478a4699626faf405b8e59b31e0f22ea55cc3e8 100644
--- a/Framework/MDAlgorithms/src/SlicingAlgorithm.cpp
+++ b/Framework/MDAlgorithms/src/SlicingAlgorithm.cpp
@@ -422,7 +422,7 @@ void SlicingAlgorithm::createGeneralTransform() {
         "the OutDimX, etc. properties.");
 
   // Now the reverse transformation
-  m_transformToOriginal = NULL;
+  m_transformToOriginal = nullptr;
   if (m_outD == inD) {
     // Can't reverse transform if you lost dimensions.
     auto ctTo = new DataObjects::CoordTransformAffine(inD, m_outD);
@@ -598,7 +598,7 @@ void SlicingAlgorithm::createAlignedTransform() {
     m_transformToOriginal = tmp;
   } else {
     // Changed # of dimensions - can't reverse the transform
-    m_transformToOriginal = NULL;
+    m_transformToOriginal = nullptr;
     g_log.warning("SlicingAlgorithm: Your slice will cause the output "
                   "workspace to have less dimensions than the input. This will "
                   "affect your ability to create subsequent slices.");
@@ -684,7 +684,7 @@ void SlicingAlgorithm::createTransform() {
   }
 
   // Create the coordinate transformation
-  m_transform = NULL;
+  m_transform = nullptr;
   if (m_axisAligned)
     this->createAlignedTransform();
   else
@@ -819,9 +819,9 @@ SlicingAlgorithm::getGeneralImplicitFunction(const size_t *const chunkMin,
     double xMin = m_binDimensions[d]->getMinimum();
     double xMax = m_binDimensions[d]->getMaximum();
     // Move the position if you're using a chunk
-    if (chunkMin != NULL)
+    if (chunkMin != nullptr)
       xMin = m_binDimensions[d]->getX(chunkMin[d]);
-    if (chunkMax != NULL)
+    if (chunkMax != nullptr)
       xMax = m_binDimensions[d]->getX(chunkMax[d]);
     // Offset the origin by the position along the basis vector
     o1 += (m_bases[d] * xMin);
diff --git a/Framework/MDAlgorithms/src/SmoothMD.cpp b/Framework/MDAlgorithms/src/SmoothMD.cpp
index 72243e086fd5a54ed67000d57740ccc6d2bf5ce2..505eb5f1c33637f37b5abd326cfeab49730f480a 100644
--- a/Framework/MDAlgorithms/src/SmoothMD.cpp
+++ b/Framework/MDAlgorithms/src/SmoothMD.cpp
@@ -126,7 +126,7 @@ SmoothMD::hatSmooth(IMDHistoWorkspace_const_sptr toSmooth,
   const int nThreads = Mantid::API::FrameworkManager::Instance()
                            .getNumOMPThreads(); // NThreads to Request
 
-  auto iterators = toSmooth->createIterators(nThreads, NULL);
+  auto iterators = toSmooth->createIterators(nThreads, nullptr);
 
   PARALLEL_FOR_NO_WSP_CHECK()
   for (int it = 0; it < int(iterators.size()); ++it) {
diff --git a/Framework/MDAlgorithms/src/TransposeMD.cpp b/Framework/MDAlgorithms/src/TransposeMD.cpp
index 0a2f355fdd10dbdf517d93e1d9fe24227b500bed..d90d42f882f8209504775ee8b2e2e68c3d9a7ec2 100644
--- a/Framework/MDAlgorithms/src/TransposeMD.cpp
+++ b/Framework/MDAlgorithms/src/TransposeMD.cpp
@@ -135,7 +135,7 @@ void TransposeMD::exec() {
   const int nThreads = Mantid::API::FrameworkManager::Instance()
                            .getNumOMPThreads(); // NThreads to Request
 
-  auto iterators = inWS->createIterators(nThreads, NULL);
+  auto iterators = inWS->createIterators(nThreads, nullptr);
 
   PARALLEL_FOR_NO_WSP_CHECK()
   for (int it = 0; it < int(iterators.size()); ++it) {
diff --git a/Framework/MDAlgorithms/src/UnitsConversionHelper.cpp b/Framework/MDAlgorithms/src/UnitsConversionHelper.cpp
index 7e29d31311e8f4fb3bee9e112edc1351f25ced3a..877572a70725e85980b97f8f8b6ba3ac82e6ce62 100644
--- a/Framework/MDAlgorithms/src/UnitsConversionHelper.cpp
+++ b/Framework/MDAlgorithms/src/UnitsConversionHelper.cpp
@@ -263,7 +263,7 @@ void UnitsConversionHelper::initialize(
 
   // get efix
   m_Efix = DetWS->getLogs()->getPropertyValueAsType<double>("Ei");
-  m_pEfixedArray = NULL;
+  m_pEfixedArray = nullptr;
   if (m_Emode == (int)Kernel::DeltaEMode::Indirect)
     m_pEfixedArray = DetWS->getColDataArray<float>("eFixed");
 
@@ -365,8 +365,8 @@ UnitsConversionHelper::UnitsConversionHelper(
 UnitsConversionHelper::UnitsConversionHelper()
     : m_UnitCnvrsn(CnvrtToMD::ConvertNo), m_Factor(1), m_Power(1),
       m_Emode(-1), // undefined
-      m_L1(1), m_Efix(1), m_TwoTheta(0), m_L2(1), m_pTwoThetas(NULL),
-      m_pL2s(NULL), m_pEfixedArray(NULL) {}
+      m_L1(1), m_Efix(1), m_TwoTheta(0), m_L2(1), m_pTwoThetas(nullptr),
+      m_pL2s(nullptr), m_pEfixedArray(nullptr) {}
 
 } // endNamespace DataObjects
 } // endNamespace Mantid
diff --git a/Framework/Nexus/src/MuonNexusReader.cpp b/Framework/Nexus/src/MuonNexusReader.cpp
index 594dc6d35b4d754ce18b5e55e0353563a411072f..b7b1c6b2c0f3dacaeb7a0e1a3d01070580cb7488 100644
--- a/Framework/Nexus/src/MuonNexusReader.cpp
+++ b/Framework/Nexus/src/MuonNexusReader.cpp
@@ -27,7 +27,7 @@ using namespace Mantid;
 MuonNexusReader::MuonNexusReader()
     : nexus_instrument_name(), nexus_samplename(), nexusLogCount(0),
       startTime_time_t(), t_nsp1(0), t_ntc1(0), t_nper(0),
-      corrected_times(NULL), counts(NULL), detectorGroupings(NULL),
+      corrected_times(nullptr), counts(nullptr), detectorGroupings(nullptr),
       numDetectors(0) {}
 
 /// Destructor deletes temp storage
diff --git a/Framework/Nexus/src/NexusClasses.cpp b/Framework/Nexus/src/NexusClasses.cpp
index f0266f90289c01b2342eec5c45e20a207610cb5a..0a2035b2d53fe3b8963498cf0fdc54b59ad8466b 100644
--- a/Framework/Nexus/src/NexusClasses.cpp
+++ b/Framework/Nexus/src/NexusClasses.cpp
@@ -596,7 +596,7 @@ Kernel::Property *NXLog::createSingleValueProperty() {
     bool state = (value[0] == 0) ? false : true;
     prop = new Kernel::PropertyWithValue<bool>(name(), state);
   } else {
-    prop = NULL;
+    prop = nullptr;
   }
 
   return prop;
@@ -625,7 +625,7 @@ Kernel::Property *NXLog::createTimeSeries(const std::string &start_time,
       std::transform(times(), times() + times.dim0(), times(),
                      std::bind2nd(std::multiplies<double>(), 60));
     } else if (!units.empty() && units.substr(0, 6) != "second") {
-      return NULL;
+      return nullptr;
     }
     return parseTimeSeries(logName, times, start_time);
   } else if (vinfo.type == NX_FLOAT32) {
@@ -637,12 +637,12 @@ Kernel::Property *NXLog::createTimeSeries(const std::string &start_time,
       std::transform(times(), times() + times.dim0(), times(),
                      std::bind2nd(std::multiplies<float>(), 60));
     } else if (!units.empty() && units.substr(0, 6) != "second") {
-      return NULL;
+      return nullptr;
     }
     return parseTimeSeries(logName, times, start_time);
   }
 
-  return NULL;
+  return nullptr;
 }
 
 } // namespace DataHandling
diff --git a/Framework/Nexus/src/NexusFileIO.cpp b/Framework/Nexus/src/NexusFileIO.cpp
index 784d92329233234c728af09671e909ea3aba7c38..fd41f17daaf35cb282659af35126a065cd9dbf1c 100644
--- a/Framework/Nexus/src/NexusFileIO.cpp
+++ b/Framework/Nexus/src/NexusFileIO.cpp
@@ -36,7 +36,7 @@ Logger g_log("NexusFileIO");
 
 /// Empty default constructor
 NexusFileIO::NexusFileIO()
-    : fileID(), m_filehandle(), m_nexuscompression(NX_COMP_LZW), m_progress(0),
+    : fileID(), m_filehandle(), m_nexuscompression(NX_COMP_LZW), m_progress(nullptr),
       m_filename() {}
 
 /// Constructor that supplies a progress object
@@ -343,7 +343,7 @@ int NexusFileIO::writeNexusProcessedData2D(
                 start, asize);
       start[0]++;
     }
-    if (m_progress != 0)
+    if (m_progress != nullptr)
       m_progress->reportIncrement(1, "Writing data");
     int signal = 1;
     NXputattr(fileID, "signal", &signal, 1, NX_INT32);
@@ -376,7 +376,7 @@ int NexusFileIO::writeNexusProcessedData2D(
       start[0]++;
     }
 
-    if (m_progress != 0)
+    if (m_progress != nullptr)
       m_progress->reportIncrement(1, "Writing data");
 
     // Fractional area for RebinnedOutput
@@ -395,7 +395,7 @@ int NexusFileIO::writeNexusProcessedData2D(
                   start, asize);
         start[0]++;
       }
-      if (m_progress != 0)
+      if (m_progress != nullptr)
         m_progress->reportIncrement(1, "Writing data");
     }
 
diff --git a/Framework/PythonInterface/mantid/api/src/CloneMatrixWorkspace.cpp b/Framework/PythonInterface/mantid/api/src/CloneMatrixWorkspace.cpp
index 93b31ecd1adfd4f92d3cfd3ecca8dd7ad1d0abe9..50221e80f91b56f5028b6f6d10bccea4c2289e8c 100644
--- a/Framework/PythonInterface/mantid/api/src/CloneMatrixWorkspace.cpp
+++ b/Framework/PythonInterface/mantid/api/src/CloneMatrixWorkspace.cpp
@@ -63,7 +63,7 @@ PyArrayObject *cloneArray(MatrixWorkspace &workspace, DataField field,
       &PyArray_Type, PyArray_DescrFromType(NPY_DOUBLE),
       2,         // rank 2
       arrayDims, // Length in each dimension
-      NULL, NULL, 0, NULL);
+      nullptr, NULL, 0, nullptr);
   double *dest = (double *)PyArray_DATA(
       nparray); // HEAD of the contiguous numpy data array
   for (size_t i = start; i < endp1; ++i) {
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactory.cpp b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactory.cpp
index e0e2d4edc987e6a3915e2fe5b1d69d2c6918c748..873f0b785067bbf983ac71c0a32f9c812bee0466 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactory.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactory.cpp
@@ -80,7 +80,7 @@ void subscribe(AlgorithmFactoryImpl &self, const boost::python::object &obj) {
       (PyObject *)
           converter::registered<Algorithm>::converters.to_python_target_type();
   // obj could be or instance/class, check instance first
-  PyObject *classObject(NULL);
+  PyObject *classObject(nullptr);
   if (PyObject_IsInstance(obj.ptr(), pyAlgClass)) {
     classObject = PyObject_GetAttrString(obj.ptr(), "__class__");
   } else if (PyObject_IsSubclass(obj.ptr(), pyAlgClass)) {
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/FunctionFactory.cpp b/Framework/PythonInterface/mantid/api/src/Exports/FunctionFactory.cpp
index ad05a3f02622d94b20f123d3b606a919a63b7070..7615fa909c072514924616f59df986262b4bca24 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/FunctionFactory.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/FunctionFactory.cpp
@@ -61,7 +61,7 @@ void subscribe(FunctionFactoryImpl &self, const boost::python::object &obj) {
       converter::registered<IFunction>::converters.to_python_target_type());
 
   // obj could be or instance/class, check instance first
-  PyObject *classObject(NULL);
+  PyObject *classObject(nullptr);
   if (PyObject_IsInstance(obj.ptr(), (PyObject *)baseClass)) {
     classObject = PyObject_GetAttrString(obj.ptr(), "__class__");
   } else if (PyObject_IsSubclass(obj.ptr(), (PyObject *)baseClass)) {
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IAlgorithm.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IAlgorithm.cpp
index 61726399180bcf4f23b95ece5ea9b426b8300315..7657ed3f22a484d779f078433c746894656ff856 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/IAlgorithm.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/IAlgorithm.cpp
@@ -206,12 +206,12 @@ std::string createDocString(IAlgorithm &self) {
  */
 struct AllowCThreads {
   explicit AllowCThreads(const object &algm)
-      : m_tracefunc(NULL), m_tracearg(NULL), m_saved(NULL), m_tracking(false) {
+      : m_tracefunc(nullptr), m_tracearg(nullptr), m_saved(nullptr), m_tracking(false) {
     PyThreadState *curThreadState = PyThreadState_GET();
     m_tracefunc = curThreadState->c_tracefunc;
     m_tracearg = curThreadState->c_traceobj;
     Py_XINCREF(m_tracearg);
-    PyEval_SetTrace(NULL, NULL);
+    PyEval_SetTrace(nullptr, nullptr);
     if (!isNone(algm)) {
       _trackAlgorithmInThread(curThreadState->thread_id, algm);
       m_tracking = true;
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IMDHistoWorkspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IMDHistoWorkspace.cpp
index 452af26f974703d97a4fc84979afbea5e3c64283..68e8e72d7e5ba4385ffc7aa6489b4280ed6135c9 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/IMDHistoWorkspace.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/IMDHistoWorkspace.cpp
@@ -26,9 +26,9 @@ PyObject *WrapReadOnlyNumpyFArray(Mantid::signal_t *arr,
   int datatype = Converters::NDArrayTypeIndex<Mantid::signal_t>::typenum;
 #if NPY_API_VERSION >= 0x00000007 //(1.7)
   PyArrayObject *nparray = (PyArrayObject *)PyArray_New(
-      &PyArray_Type, static_cast<int>(dims.size()), &dims[0], datatype, NULL,
+      &PyArray_Type, static_cast<int>(dims.size()), &dims[0], datatype, nullptr,
       static_cast<void *>(const_cast<double *>(arr)), 0, NPY_ARRAY_FARRAY,
-      NULL);
+      nullptr);
   PyArray_CLEARFLAGS(nparray, NPY_ARRAY_WRITEABLE);
 #else
   PyArrayObject *nparray = (PyArrayObject *)PyArray_New(
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/ITableWorkspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/ITableWorkspace.cpp
index 0b2dd40fd55a3ba4a224aa9d5fa8679e7c113ef1..b0d0216d104c1988cda5be7c01164729157a12fb 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/ITableWorkspace.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/ITableWorkspace.cpp
@@ -75,7 +75,7 @@ PyObject *getValue(Mantid::API::Column_const_sptr column,
   // -- Use the boost preprocessor to generate a list of else if clause to cut
   // out copy
   // and pasted code.
-  PyObject *result(NULL);
+  PyObject *result(nullptr);
   if (false) {
   } // So that it always falls through to the list checking
   BOOST_PP_LIST_FOR_EACH(GET_BUILTIN, _, BUILTIN_TYPES)
@@ -155,7 +155,7 @@ bool addColumnPlotType(ITableWorkspace &self, const std::string &type,
   if (column)
     column->setPlotType(plottype);
 
-  return column != 0;
+  return column != nullptr;
 }
 
 /**
@@ -170,7 +170,7 @@ bool addColumnPlotType(ITableWorkspace &self, const std::string &type,
  */
 bool addColumnSimple(ITableWorkspace &self, const std::string &type,
                      const std::string &name) {
-  return self.addColumn(type, name) != 0;
+  return self.addColumn(type, name) != nullptr;
 }
 
 /**
diff --git a/Framework/PythonInterface/mantid/api/src/ExtractWorkspace.cpp b/Framework/PythonInterface/mantid/api/src/ExtractWorkspace.cpp
index 50657cc83158dbb87ef23d8b56f3391581244b7d..4540b383f2d40f3f9d2dacfc108faeac3dedcb5a 100644
--- a/Framework/PythonInterface/mantid/api/src/ExtractWorkspace.cpp
+++ b/Framework/PythonInterface/mantid/api/src/ExtractWorkspace.cpp
@@ -37,7 +37,7 @@ ExtractWorkspace::ExtractWorkspace(const boost::python::api::object &pyvalue)
  * Check whether the extract can pull out the workspace type
  * @return True if it can be converted, false otherwise
  */
-bool ExtractWorkspace::check() const { return m_value.get() != NULL; }
+bool ExtractWorkspace::check() const { return m_value.get() != nullptr; }
 
 /**
  * @return The extracted shared_ptr or throws std::invalid_argument
diff --git a/Framework/PythonInterface/mantid/api/src/FitFunctions/IFunctionAdapter.cpp b/Framework/PythonInterface/mantid/api/src/FitFunctions/IFunctionAdapter.cpp
index 2e159647b9d6d06040d76b1c43de5ec3172af55c..5f0597d968195ff50e678717a2495e037a4bfec9 100644
--- a/Framework/PythonInterface/mantid/api/src/FitFunctions/IFunctionAdapter.cpp
+++ b/Framework/PythonInterface/mantid/api/src/FitFunctions/IFunctionAdapter.cpp
@@ -99,7 +99,7 @@ PyObject *IFunctionAdapter::getAttributeValue(const std::string &name) {
 PyObject *
 IFunctionAdapter::getAttributeValue(const API::IFunction::Attribute &attr) {
   std::string type = attr.type();
-  PyObject *result(NULL);
+  PyObject *result(nullptr);
   if (type == "int")
     result = to_python_value<const int &>()(attr.asInt());
   else if (type == "double")
diff --git a/Framework/PythonInterface/mantid/api/src/PythonAlgorithm/AlgorithmAdapter.cpp b/Framework/PythonInterface/mantid/api/src/PythonAlgorithm/AlgorithmAdapter.cpp
index 593ecb9fd069b62f130afb69ccecac577d55146c..539b2abb160910e877c1707448e6d5ff417c81f8 100644
--- a/Framework/PythonInterface/mantid/api/src/PythonAlgorithm/AlgorithmAdapter.cpp
+++ b/Framework/PythonInterface/mantid/api/src/PythonAlgorithm/AlgorithmAdapter.cpp
@@ -22,7 +22,7 @@ using Environment::CallMethod0;
  */
 template <typename BaseAlgorithm>
 AlgorithmAdapter<BaseAlgorithm>::AlgorithmAdapter(PyObject *self)
-    : BaseAlgorithm(), m_self(self), m_isRunningObj(NULL), m_wikiSummary("") {
+    : BaseAlgorithm(), m_self(self), m_isRunningObj(nullptr), m_wikiSummary("") {
   // Cache the isRunning call to save the lookup each time it is called
   // as it is most likely called in a loop
 
@@ -141,7 +141,7 @@ bool AlgorithmAdapter<BaseAlgorithm>::isRunning() const {
     return SuperClass::isRunning();
   } else {
     Environment::GlobalInterpreterLock gil;
-    PyObject *result = PyObject_CallObject(m_isRunningObj, NULL);
+    PyObject *result = PyObject_CallObject(m_isRunningObj, nullptr);
     if (PyErr_Occurred())
       Environment::throwRuntimeError(true);
     if (PyBool_Check(result))
diff --git a/Framework/PythonInterface/mantid/kernel/src/Converters/NumpyFunctions.cpp b/Framework/PythonInterface/mantid/kernel/src/Converters/NumpyFunctions.cpp
index 5696352a6cacb38cdb90e5ff7b5e0a487572301c..15f94382e8dd529ed6bc09ca8d79f90dbd06e990 100644
--- a/Framework/PythonInterface/mantid/kernel/src/Converters/NumpyFunctions.cpp
+++ b/Framework/PythonInterface/mantid/kernel/src/Converters/NumpyFunctions.cpp
@@ -14,7 +14,7 @@ PyArrayObject *func_PyArray_NewFromDescr(int datatype, const int ndims,
   return (PyArrayObject *)PyArray_NewFromDescr(
       &PyArray_Type, PyArray_DescrFromType(datatype), ndims, // rank
       dims, // Length in each dimension
-      NULL, NULL, 0, NULL);
+      nullptr, NULL, 0, nullptr);
 }
 }
 }
diff --git a/Framework/PythonInterface/mantid/kernel/src/Environment/ErrorHandling.cpp b/Framework/PythonInterface/mantid/kernel/src/Environment/ErrorHandling.cpp
index d3fcc6369ee45b0424a5389baa6cbbe4337597d2..a405ac23c307d8c8ecbfb3ac91b946cc7d031691 100644
--- a/Framework/PythonInterface/mantid/kernel/src/Environment/ErrorHandling.cpp
+++ b/Framework/PythonInterface/mantid/kernel/src/Environment/ErrorHandling.cpp
@@ -15,7 +15,7 @@ namespace Environment {
 namespace {
 void tracebackToMsg(std::stringstream &msg, PyTracebackObject *traceback,
                     bool root = true) {
-  if (traceback == NULL)
+  if (traceback == nullptr)
     return;
   msg << "\n  ";
   if (root)
@@ -41,7 +41,7 @@ void throwRuntimeError(const bool withTrace) {
     throw std::runtime_error(
         "ErrorHandling::throwRuntimeError - No Python error state set!");
   }
-  PyObject *exception(NULL), *value(NULL), *traceback(NULL);
+  PyObject *exception(nullptr), *value(nullptr), *traceback(nullptr);
   PyErr_Fetch(&exception, &value, &traceback);
   PyErr_NormalizeException(&exception, &value, &traceback);
   PyErr_Clear();
diff --git a/Framework/PythonInterface/mantid/kernel/src/Registry/SequenceTypeHandler.cpp b/Framework/PythonInterface/mantid/kernel/src/Registry/SequenceTypeHandler.cpp
index 6bfecc3bc6be3e3ed27907a9adcc534f75dd2fbd..0063e81f5df4a1baaa1b3d6a60e04bb078b09bc9 100644
--- a/Framework/PythonInterface/mantid/kernel/src/Registry/SequenceTypeHandler.cpp
+++ b/Framework/PythonInterface/mantid/kernel/src/Registry/SequenceTypeHandler.cpp
@@ -97,7 +97,7 @@ Kernel::Property *SequenceTypeHandler<ContainerType>::create(
     valueInC = std::vector<DestElementType>(1, scalar);
   }
 
-  Kernel::Property *valueProp(NULL);
+  Kernel::Property *valueProp(nullptr);
   if (isNone(validator)) {
     valueProp =
         new Kernel::PropertyWithValue<ContainerType>(name, valueInC, direction);
diff --git a/Framework/RemoteJobManagers/src/MantidWebServiceAPIHelper.cpp b/Framework/RemoteJobManagers/src/MantidWebServiceAPIHelper.cpp
index c917c0afe5cca5d3f621f44478e3e25ed43ab254..8022e369194333a233339765cee66d7bf9287ed9 100644
--- a/Framework/RemoteJobManagers/src/MantidWebServiceAPIHelper.cpp
+++ b/Framework/RemoteJobManagers/src/MantidWebServiceAPIHelper.cpp
@@ -21,7 +21,7 @@ std::vector<Poco::Net::HTTPCookie> MantidWebServiceAPIHelper::g_cookies;
 
 MantidWebServiceAPIHelper::MantidWebServiceAPIHelper()
     : m_session(
-          NULL) // Make sure this is always either NULL or a valid pointer.
+          nullptr) // Make sure this is always either NULL or a valid pointer.
 {
   // TODO: the job manager factory or someone else should set this, and then
   // this class would be usable with any other compute resource that implements
@@ -182,7 +182,7 @@ void MantidWebServiceAPIHelper::initHTTPRequest(Poco::Net::HTTPRequest &req,
   // Set up the session object
   if (m_session) {
     delete m_session;
-    m_session = NULL;
+    m_session = nullptr;
   }
 
   if (Poco::URI(m_serviceBaseUrl).getScheme() == "https") {
diff --git a/Framework/SINQ/src/InvertMDDim.cpp b/Framework/SINQ/src/InvertMDDim.cpp
index f266f70ab46c145178eb9764a4cd20afaff11ce7..cfb4e6cd467bd29c22b88bb1bce153f1c62ab5c8 100644
--- a/Framework/SINQ/src/InvertMDDim.cpp
+++ b/Framework/SINQ/src/InvertMDDim.cpp
@@ -44,7 +44,7 @@ void InvertMDDim::exec() {
 
   int rank = static_cast<int>(inWS->getNumDims());
   auto idx = new int[rank];
-  if (idx == NULL || outWS == NULL) {
+  if (idx == nullptr || outWS == nullptr) {
     throw std::runtime_error("Out of memory in InvertMDDim");
   }
   recurseDim(inWS, outWS, 0, idx, rank);
diff --git a/Framework/SINQ/src/PoldiUtilities/PoldiDetectorFactory.cpp b/Framework/SINQ/src/PoldiUtilities/PoldiDetectorFactory.cpp
index a0602aa90334fe82427c4a9863fde1b532be8b23..5084815893e7e95c0c0c2a09a47af1cc6a9c54b5 100644
--- a/Framework/SINQ/src/PoldiUtilities/PoldiDetectorFactory.cpp
+++ b/Framework/SINQ/src/PoldiUtilities/PoldiDetectorFactory.cpp
@@ -22,7 +22,7 @@ PoldiDetectorFactory::createDetector(date experimentDate) {
     return new PoldiHeliumDetector();
   }
 
-  return 0;
+  return nullptr;
 }
 
 } // namespace Poldi
diff --git a/Framework/SINQ/src/SINQHMListener.cpp b/Framework/SINQ/src/SINQHMListener.cpp
index 408cb99013cbea6f21fdd3eaf3cf0325cdf8615e..4b79bd86d4a39cc74b8deccbaaa3305340532129 100644
--- a/Framework/SINQ/src/SINQHMListener.cpp
+++ b/Framework/SINQ/src/SINQHMListener.cpp
@@ -221,7 +221,7 @@ void SINQHMListener::recurseDim(int *data, IMDHistoWorkspace_sptr ws,
 }
 
 void SINQHMListener::readHMData(IMDHistoWorkspace_sptr ws) {
-  int *data = NULL, length = 1;
+  int *data = nullptr, length = 1;
   coord_t *idx;
 
   for (int i = 0; i < rank; i++) {
@@ -232,7 +232,7 @@ void SINQHMListener::readHMData(IMDHistoWorkspace_sptr ws) {
   std::istream &istr = httpRequest(pathBuffer.str());
 
   data = (int *)malloc(length * sizeof(int));
-  if (data == NULL) {
+  if (data == nullptr) {
     throw std::runtime_error("Out of memory reading HM data");
   }
   istr.read((char *)data, length * sizeof(int));
diff --git a/Framework/TestHelpers/src/ComponentCreationHelper.cpp b/Framework/TestHelpers/src/ComponentCreationHelper.cpp
index f6cf5e6bde56ac6e256f8954e6cf94e2528557d1..c90770d1eec9190d3457df961f68e6796fc93936 100644
--- a/Framework/TestHelpers/src/ComponentCreationHelper.cpp
+++ b/Framework/TestHelpers/src/ComponentCreationHelper.cpp
@@ -159,8 +159,7 @@ createDetectorGroupWith5CylindricalDetectors() {
   for (int i = 0; i < ndets; ++i) {
     std::ostringstream os;
     os << "d" << i;
-    boost::shared_ptr<Detector> det(
-        new Detector(os.str(), i + 1, detShape, NULL));
+    auto det = boost::make_shared<Detector>(os.str(), i + 1, detShape, nullptr);
     det->setPos((double)(i + 1), 2.0, 2.0);
     groupMembers[i] = det;
   }
@@ -184,8 +183,7 @@ createDetectorGroupWithNCylindricalDetectorsWithGaps(unsigned int nDet,
   for (unsigned int i = 0; i < nDet; ++i) {
     std::ostringstream os;
     os << "d" << i;
-    boost::shared_ptr<Detector> det(
-        new Detector(os.str(), i + 1, detShape, NULL));
+    auto det = boost::make_shared<Detector>(os.str(), i + 1, detShape, nullptr);
     det->setPos(double(-0.5 * nDet + i) + gap, 2.0, 2.0);
     groupMembers[i] = det;
   }
@@ -225,8 +223,7 @@ createRingOfCylindricalDetectors(const double R_min, const double R_max,
       if (Rsq >= Rmin2 && Rsq < Rmax2) {
         std::ostringstream os;
         os << "d" << ic;
-        boost::shared_ptr<Detector> det(
-            new Detector(os.str(), ic + 1, detShape, NULL));
+        auto det = boost::make_shared<Detector>(os.str(), ic + 1, detShape, nullptr);
         det->setPos(x, y, z0);
         groupMembers.push_back(det);
       }
@@ -248,7 +245,7 @@ boost::shared_ptr<DetectorGroup> createGroupOfTwoMonitors() {
   for (int i = 0; i < ndets; ++i) {
     std::ostringstream os;
     os << "m" << i;
-    boost::shared_ptr<Detector> det(new Detector(os.str(), i + 1, NULL));
+    auto det = boost::make_shared<Detector>(os.str(), i + 1, nullptr);
     det->setPos((double)(i + 1), 2.0, 2.0);
     det->markAsMonitor();
     groupMembers[i] = det;
@@ -584,7 +581,7 @@ createMinimalInstrument(const Mantid::Kernel::V3D &sourcePos,
   instrument->markAsSamplePos(sample);
 
   // A detector
-  Detector *det = new Detector("point-detector", 1 /*detector id*/, NULL);
+  Detector *det = new Detector("point-detector", 1 /*detector id*/, nullptr);
   det->setPos(detectorPos);
   det->setShape(createSphere(0.01 /*1cm*/, V3D(0, 0, 0), "1"));
   instrument->add(det);
diff --git a/Framework/TestHelpers/src/MDEventsTestHelper.cpp b/Framework/TestHelpers/src/MDEventsTestHelper.cpp
index fc4f180a7bd39c9b27608e7bff5749f2c2c2d578..e7f60a1676a124d84abaea8c19363c9992ee1505 100644
--- a/Framework/TestHelpers/src/MDEventsTestHelper.cpp
+++ b/Framework/TestHelpers/src/MDEventsTestHelper.cpp
@@ -72,7 +72,7 @@ createDiffractionEventWorkspace(int numEvents, int numPixels, int numBins) {
       "IDFs_for_UNIT_TESTING/MINITOPAZ_Definition.xml");
   InstrumentDefinitionParser parser(filename, "MINITOPAZ",
                                     Strings::loadFile(filename));
-  auto instrument = parser.parseXML(NULL);
+  auto instrument = parser.parseXML(nullptr);
   retVal->populateInstrumentParameters();
   retVal->setInstrument(instrument);
 
@@ -256,9 +256,7 @@ makeFakeMDHistoWorkspaceGeneral(size_t numDims, double signal,
     dimensions.push_back(MDHistoDimension_sptr(new MDHistoDimension(
         names[d], names[d], frame, min[d], max[d], numBins[d])));
 
-  MDHistoWorkspace *ws = NULL;
-  ws = new MDHistoWorkspace(dimensions);
-  MDHistoWorkspace_sptr ws_sptr(ws);
+  MDHistoWorkspace_sptr ws_sptr = boost::make_shared<MDHistoWorkspace>(dimensions);
   ws_sptr->setTo(signal, errorSquared, 1.0 /* num events */);
   if (!name.empty())
     AnalysisDataService::Instance().addOrReplace(name, ws_sptr);
@@ -291,9 +289,7 @@ MDHistoWorkspace_sptr makeFakeMDHistoWorkspaceGeneral(
     dimensions.push_back(MDHistoDimension_sptr(new MDHistoDimension(
         names[d], names[d], frame, min[d], max[d], numBins[d])));
 
-  MDHistoWorkspace *ws = NULL;
-  ws = new MDHistoWorkspace(dimensions);
-  MDHistoWorkspace_sptr ws_sptr(ws);
+  MDHistoWorkspace_sptr ws_sptr = boost::make_shared<MDHistoWorkspace>(dimensions);
   ws_sptr->setTo(signal, errorSquared, 1.0 /* num events */);
   if (!name.empty())
     AnalysisDataService::Instance().addOrReplace(name, ws_sptr);
@@ -318,39 +314,33 @@ Mantid::DataObjects::MDHistoWorkspace_sptr makeFakeMDHistoWorkspaceWithMDFrame(
     double signal, size_t numDims, const Mantid::Geometry::MDFrame &frame,
     size_t numBins, coord_t max, double errorSquared, std::string name,
     double numEvents) {
-  MDHistoWorkspace *ws = NULL;
+  //MDHistoWorkspace *ws = nullptr;
+  MDHistoWorkspace_sptr ws_sptr;
   if (numDims == 1) {
-    ws = new MDHistoWorkspace(MDHistoDimension_sptr(
-        new MDHistoDimension("x", "x", frame, 0.0, max, numBins)));
+      ws_sptr = boost::make_shared<MDHistoWorkspace>(boost::make_shared<MDHistoDimension>("x", "x", frame, 0.0, max, numBins));
   } else if (numDims == 2) {
-    ws = new MDHistoWorkspace(MDHistoDimension_sptr(new MDHistoDimension(
-                                  "x", "x", frame, 0.0, max, numBins)),
-                              MDHistoDimension_sptr(new MDHistoDimension(
-                                  "y", "y", frame, 0.0, max, numBins)));
+      ws_sptr = boost::make_shared<MDHistoWorkspace>(boost::make_shared<MDHistoDimension>(
+                                  "x", "x", frame, 0.0, max, numBins),
+                              boost::make_shared<MDHistoDimension>(
+                                  "y", "y", frame, 0.0, max, numBins));
   } else if (numDims == 3) {
-    ws = new MDHistoWorkspace(MDHistoDimension_sptr(new MDHistoDimension(
-                                  "x", "x", frame, 0.0, max, numBins)),
-                              MDHistoDimension_sptr(new MDHistoDimension(
-                                  "y", "y", frame, 0.0, max, numBins)),
-                              MDHistoDimension_sptr(new MDHistoDimension(
-                                  "z", "z", frame, 0.0, max, numBins)));
+    ws_sptr = boost::make_shared<MDHistoWorkspace>(boost::make_shared<MDHistoDimension>(
+                                  "x", "x", frame, 0.0, max, numBins),
+                              boost::make_shared<MDHistoDimension>(
+                                  "y", "y", frame, 0.0, max, numBins),
+                              boost::make_shared<MDHistoDimension>(
+                                  "z", "z", frame, 0.0, max, numBins));
   } else if (numDims == 4) {
-    ws = new MDHistoWorkspace(
-        MDHistoDimension_sptr(
-            new MDHistoDimension("x", "x", frame, 0.0, max, numBins)),
-        MDHistoDimension_sptr(
-            new MDHistoDimension("y", "y", frame, 0.0, max, numBins)),
-        MDHistoDimension_sptr(
-            new MDHistoDimension("z", "z", frame, 0.0, max, numBins)),
-        MDHistoDimension_sptr(
-            new MDHistoDimension("t", "t", frame, 0.0, max, numBins)));
+    ws_sptr = boost::make_shared<MDHistoWorkspace>(boost::make_shared<MDHistoDimension>("x", "x", frame, 0.0, max, numBins),
+        boost::make_shared<MDHistoDimension>("y", "y", frame, 0.0, max, numBins),
+        boost::make_shared<MDHistoDimension>("z", "z", frame, 0.0, max, numBins),
+        boost::make_shared<MDHistoDimension>("t", "t", frame, 0.0, max, numBins));
   }
 
-  if (!ws)
+  if (!ws_sptr)
     throw std::runtime_error(
         " invalid or unsupported number of dimensions given");
 
-  MDHistoWorkspace_sptr ws_sptr(ws);
   ws_sptr->setTo(signal, errorSquared, numEvents);
   ws_sptr->addExperimentInfo(ExperimentInfo_sptr(new ExperimentInfo()));
   if (!name.empty())
diff --git a/Framework/TestHelpers/src/NexusTestHelper.cpp b/Framework/TestHelpers/src/NexusTestHelper.cpp
index 4667e73470a2ced9baced1ff5c0cfb13dfb6db28..9fb8bf16a84b3c4c0ab64905c03ee9aad134781c 100644
--- a/Framework/TestHelpers/src/NexusTestHelper.cpp
+++ b/Framework/TestHelpers/src/NexusTestHelper.cpp
@@ -12,7 +12,7 @@
 /** Constructor.
    * */
 NexusTestHelper::NexusTestHelper(bool deleteFile)
-    : file(NULL), deleteFile(deleteFile) {}
+    : file(nullptr), deleteFile(deleteFile) {}
 
 //----------------------------------------------------------------------------------------------
 /** Destructor.
diff --git a/Framework/TestHelpers/src/WorkspaceCreationHelper.cpp b/Framework/TestHelpers/src/WorkspaceCreationHelper.cpp
index e919b750834b6cd45b02eb537c75da831f8e8def..48a7e6e461cf3987158644e27502f998130e20d5 100644
--- a/Framework/TestHelpers/src/WorkspaceCreationHelper.cpp
+++ b/Framework/TestHelpers/src/WorkspaceCreationHelper.cpp
@@ -217,7 +217,7 @@ Workspace2D_sptr maskSpectra(Workspace2D_sptr workspace,
     ShapeFactory sFactory;
     boost::shared_ptr<Object> shape = sFactory.createShape(xmlShape);
     for (int i = 0; i < nhist; ++i) {
-      Detector *det = new Detector("det", detid_t(i), shape, NULL);
+      Detector *det = new Detector("det", detid_t(i), shape, nullptr);
       det->setPos(i, i + 1, 1);
       instrument->add(det);
       instrument->markAsDetector(det);
@@ -533,7 +533,7 @@ create2DWorkspaceWithReflectometryInstrument(double startX) {
   instrument->add(source);
   instrument->markAsSource(source);
 
-  Detector *monitor = new Detector("Monitor", 1, NULL);
+  Detector *monitor = new Detector("Monitor", 1, nullptr);
   monitor->setPos(14, 0, 0);
   instrument->add(monitor);
   instrument->markAsMonitor(monitor);
@@ -546,7 +546,7 @@ create2DWorkspaceWithReflectometryInstrument(double startX) {
   // Where 0.01 is half detector width etc.
   Detector *det = new Detector(
       "point-detector", 2,
-      ComponentCreationHelper::createCuboid(0.01, 0.02, 0.03), NULL);
+      ComponentCreationHelper::createCuboid(0.01, 0.02, 0.03), nullptr);
   det->setPos(20, (20 - sample->getPos().X()), 0);
   instrument->add(det);
   instrument->markAsDetector(det);
@@ -589,7 +589,7 @@ void createInstrumentForWorkspaceWithDistances(
   for (int i = 0; i < static_cast<int>(detectorPositions.size()); ++i) {
     std::stringstream buffer;
     buffer << "detector_" << i;
-    Detector *det = new Detector(buffer.str(), i, NULL);
+    Detector *det = new Detector(buffer.str(), i, nullptr);
     det->setPos(detectorPositions[i]);
     instrument->add(det);
     instrument->markAsDetector(det);
diff --git a/Framework/WorkflowAlgorithms/src/AlignAndFocusPowder.cpp b/Framework/WorkflowAlgorithms/src/AlignAndFocusPowder.cpp
index 6232ca0a476f9543eb9d449f6a9fd4c22d93e960..fec6363d95c0299bc0e874ebf1f450a781a85fde 100644
--- a/Framework/WorkflowAlgorithms/src/AlignAndFocusPowder.cpp
+++ b/Framework/WorkflowAlgorithms/src/AlignAndFocusPowder.cpp
@@ -39,7 +39,7 @@ AlignAndFocusPowder::AlignAndFocusPowder()
     : API::DataProcessorAlgorithm(), m_l1(0.0), m_resampleX(0), dspace(false),
       xmin(0.0), xmax(0.0), LRef(0.0), DIFCref(0.0), minwl(0.0), maxwl(0.),
       tmin(0.0), tmax(0.0), m_preserveEvents(false), m_processLowResTOF(false),
-      m_lowResSpecOffset(0), m_progress(NULL) {}
+      m_lowResSpecOffset(0), m_progress(nullptr) {}
 
 AlignAndFocusPowder::~AlignAndFocusPowder() {
   if (m_progress)
diff --git a/Framework/WorkflowAlgorithms/src/SANSSolidAngleCorrection.cpp b/Framework/WorkflowAlgorithms/src/SANSSolidAngleCorrection.cpp
index dbceb9892670dabce847ec333ae46dabdd3b2606..5da069d2e3809000bc70c88ce05e9b65c77d021d 100644
--- a/Framework/WorkflowAlgorithms/src/SANSSolidAngleCorrection.cpp
+++ b/Framework/WorkflowAlgorithms/src/SANSSolidAngleCorrection.cpp
@@ -32,7 +32,7 @@ static double getYTubeAngle(IDetector_const_sptr det,
       workspace->getInstrument()->getSource();
   Geometry::IComponent_const_sptr sample =
       workspace->getInstrument()->getSample();
-  if (source == NULL || sample == NULL) {
+  if (source == nullptr || sample == nullptr) {
     throw std::invalid_argument("Instrument not sufficiently defined: failed "
                                 "to get source and/or sample");
   }