diff --git a/Framework/API/src/FileFinder.cpp b/Framework/API/src/FileFinder.cpp
index a9b808e4915382c2a9bb94d01aab57f77112157d..5e6f1f8d668f249a9344a670f41ae0163bb87779 100644
--- a/Framework/API/src/FileFinder.cpp
+++ b/Framework/API/src/FileFinder.cpp
@@ -134,9 +134,8 @@ std::string FileFinderImpl::getFullPath(const std::string &filename,
     if (fName.find("*") != std::string::npos) {
 #endif
       Poco::Path path(searchPath, fName);
-      Poco::Path pathPattern(path);
       std::set<std::string> files;
-      Kernel::Glob::glob(pathPattern, files, m_globOption);
+      Kernel::Glob::glob(path, files, m_globOption);
       if (!files.empty()) {
         Poco::File matchPath(*files.begin());
         if (ignoreDirs && matchPath.isDirectory()) {
diff --git a/Framework/API/src/ImplicitFunctionParserFactory.cpp b/Framework/API/src/ImplicitFunctionParserFactory.cpp
index 9a13f894941560ad6e748903857b93a2fa91e4ef..14e1ab5afd4977a6c9b397a19295fa1e9c31d3aa 100644
--- a/Framework/API/src/ImplicitFunctionParserFactory.cpp
+++ b/Framework/API/src/ImplicitFunctionParserFactory.cpp
@@ -18,7 +18,7 @@ ImplicitFunctionParserFactoryImpl::create(const std::string &xmlString) const {
 ImplicitFunctionParser *
 ImplicitFunctionParserFactoryImpl::createImplicitFunctionParserFromXML(
     Poco::XML::Element *functionElement) const {
-  std::string name = functionElement->localName();
+  const std::string &name = functionElement->localName();
   if (name != "Function") {
     throw std::runtime_error(
         "Root node must be a Funtion element. Unable to determine parsers.");
diff --git a/Framework/API/src/Run.cpp b/Framework/API/src/Run.cpp
index 0e256285d942737f7b5d98d3cbfb0aff0d1b0ce3..c214009079f8cafe334bcc1d0cc47b075a6d72a6 100644
--- a/Framework/API/src/Run.cpp
+++ b/Framework/API/src/Run.cpp
@@ -184,7 +184,7 @@ void Run::integrateProtonCharge(const std::string &logname) const {
   if (log) {
     const std::vector<double> logValues = log->valuesAsVector();
     double total = std::accumulate(logValues.begin(), logValues.end(), 0.0);
-    std::string unit = log->units();
+    const std::string &unit = log->units();
     // Do we need to take account of a unit
     if (unit.find("picoCoulomb") != std::string::npos) {
       /// Conversion factor between picoColumbs and microAmp*hours
diff --git a/Framework/Crystal/inc/MantidCrystal/LoadIsawPeaks.h b/Framework/Crystal/inc/MantidCrystal/LoadIsawPeaks.h
index a20c141abfb32bf64436a78348b8473c0871b568..6bd149be3fca963d7651737212058c7d87a113e9 100644
--- a/Framework/Crystal/inc/MantidCrystal/LoadIsawPeaks.h
+++ b/Framework/Crystal/inc/MantidCrystal/LoadIsawPeaks.h
@@ -46,7 +46,6 @@ private:
 
   /// Reads calibration/detector section and returns first word of next line
   std::string ApplyCalibInfo(std::ifstream &in, std::string startChar,
-                             Geometry::Instrument_const_sptr instr_old,
                              Geometry::Instrument_const_sptr instr, double &T0);
 
   /// Reads first line of peaks file and returns first word of next line
diff --git a/Framework/Crystal/src/CalculatePeaksHKL.cpp b/Framework/Crystal/src/CalculatePeaksHKL.cpp
index f59327ce146338b764ef8d1550843fd781148c1b..7f5b556a522ec6bda12211082153f4b5c1256f0a 100644
--- a/Framework/Crystal/src/CalculatePeaksHKL.cpp
+++ b/Framework/Crystal/src/CalculatePeaksHKL.cpp
@@ -52,7 +52,7 @@ void CalculatePeaksHKL::exec() {
   const int n_peaks = ws->getNumberPeaks();
 
   OrientedLattice o_lattice = ws->mutableSample().getOrientedLattice();
-  Matrix<double> UB = o_lattice.getUB();
+  const Matrix<double> &UB = o_lattice.getUB();
 
   DblMatrix UB_inverse(UB);
 
diff --git a/Framework/Crystal/src/IndexPeaks.cpp b/Framework/Crystal/src/IndexPeaks.cpp
index dfb86fb5e615bc981917138d58a7e24b3f36ee99..ddc1c214b7db7ad624bbb50188faed559522527e 100644
--- a/Framework/Crystal/src/IndexPeaks.cpp
+++ b/Framework/Crystal/src/IndexPeaks.cpp
@@ -51,7 +51,7 @@ void IndexPeaks::exec() {
   }
 
   OrientedLattice o_lattice = ws->mutableSample().getOrientedLattice();
-  Matrix<double> UB = o_lattice.getUB();
+  const Matrix<double> &UB = o_lattice.getUB();
 
   if (!IndexingUtils::CheckUB(UB)) {
     throw std::runtime_error(
diff --git a/Framework/Crystal/src/LoadIsawPeaks.cpp b/Framework/Crystal/src/LoadIsawPeaks.cpp
index 5c9ff368422c4360be891af663901c14a9384e1b..380f44d976b3ecab5f198de8d4f7e239d2fc3d91 100644
--- a/Framework/Crystal/src/LoadIsawPeaks.cpp
+++ b/Framework/Crystal/src/LoadIsawPeaks.cpp
@@ -108,10 +108,8 @@ void LoadIsawPeaks::exec() {
 //----------------------------------------------------------------------------------------------
 std::string
 LoadIsawPeaks::ApplyCalibInfo(std::ifstream &in, std::string startChar,
-                              Geometry::Instrument_const_sptr instr_old,
                               Geometry::Instrument_const_sptr instr,
                               double &T0) {
-  ParameterMap_sptr parMap1 = instr_old->getParameterMap();
 
   ParameterMap_sptr parMap = instr->getParameterMap();
 
@@ -136,7 +134,7 @@ LoadIsawPeaks::ApplyCalibInfo(std::ifstream &in, std::string startChar,
     iss >> T0;
     V3D sampPos = instr->getSample()->getPos();
     SCDCalibratePanels::FixUpSourceParameterMap(instr, L1 / 100, sampPos,
-                                                parMap1);
+                                                parMap);
   } catch (...) {
     g_log.error() << "Invalid L1 or Time offset\n";
     throw std::invalid_argument("Invalid L1 or Time offset");
@@ -196,7 +194,7 @@ LoadIsawPeaks::ApplyCalibInfo(std::ifstream &in, std::string startChar,
     }
     bankName += SbankNum;
     boost::shared_ptr<const Geometry::IComponent> bank =
-        getCachedBankByName(bankName, instr_old);
+        getCachedBankByName(bankName, instr);
 
     if (!bank) {
       g_log.error() << "There is no bank " << bankName
@@ -216,7 +214,7 @@ LoadIsawPeaks::ApplyCalibInfo(std::ifstream &in, std::string startChar,
     bankRot.inverse();
     Quat dRot = thisRot * bankRot;
 
-    boost::shared_ptr<const Geometry::RectangularDetector> bankR =
+    auto bankR =
         boost::dynamic_pointer_cast<const Geometry::RectangularDetector>(bank);
 
     if (!bankR)
@@ -227,11 +225,10 @@ LoadIsawPeaks::ApplyCalibInfo(std::ifstream &in, std::string startChar,
       DetWScale = width / bankR->xsize() / 100;
       DetHtScale = height / bankR->ysize() / 100;
     }
-    std::vector<std::string> bankNames;
-    bankNames.push_back(bankName);
+    std::vector<std::string> bankNames{bankName};
 
     SCDCalibratePanels::FixUpBankParameterMap(
-        bankNames, instr, dPos, dRot, DetWScale, DetHtScale, parMap1, false);
+        bankNames, instr, dPos, dRot, DetWScale, DetHtScale, parMap, false);
   }
   return startChar;
 }
@@ -294,13 +291,9 @@ std::string LoadIsawPeaks::readHeader(PeaksWorkspace_sptr outWS,
   // Populate the instrument parameters in this workspace - this works around a
   // bug
   tempWS->populateInstrumentParameters();
-  Geometry::Instrument_const_sptr instr_old = tempWS->getInstrument();
-  auto instr = instr_old;
-  /*auto map = boost::make_shared<ParameterMap>();
-  auto instr = boost::make_shared<const Geometry::Instrument>(
-      instr_old->baseInstrument(), map);*/
+  Geometry::Instrument_const_sptr instr = tempWS->getInstrument();
 
-  std::string s = ApplyCalibInfo(in, "", instr_old, instr, T0);
+  std::string s = ApplyCalibInfo(in, "", instr, T0);
   outWS->setInstrument(instr);
 
   // Now skip all lines on L1, detector banks, etc. until we get to a block of
@@ -565,7 +558,7 @@ void LoadIsawPeaks::appendFile(PeaksWorkspace_sptr outWS,
       Peak peak = readPeak(outWS, s, in, seqNum, bankName, qSign);
 
       // Get the calculated goniometer matrix
-      Matrix<double> gonMat = uniGonio.getR();
+      const Matrix<double> &gonMat = uniGonio.getR();
 
       peak.setGoniometerMatrix(gonMat);
       peak.setRunNumber(run);
diff --git a/Framework/Crystal/src/PredictFractionalPeaks.cpp b/Framework/Crystal/src/PredictFractionalPeaks.cpp
index 86a4906756c942366c2d9c93837b1db763e7f3e1..d422382a590adff69201c6992606f3809c0b8146 100644
--- a/Framework/Crystal/src/PredictFractionalPeaks.cpp
+++ b/Framework/Crystal/src/PredictFractionalPeaks.cpp
@@ -161,7 +161,7 @@ void PredictFractionalPeaks::exec() {
     hkl[2] = peak0.getL();
   }
 
-  Kernel::DblMatrix UB = ol.getUB();
+  const Kernel::DblMatrix &UB = ol.getUB();
   vector<vector<int>> AlreadyDonePeaks;
   bool done = false;
   int ErrPos = 1; // Used to determine position in code of a throw
diff --git a/Framework/Crystal/src/PredictPeaks.cpp b/Framework/Crystal/src/PredictPeaks.cpp
index 5eb7006a96b6c541aead82ab58add40fb792df60..554d29f25bbcb463f6d99d8e5ea838a796e362de 100644
--- a/Framework/Crystal/src/PredictPeaks.cpp
+++ b/Framework/Crystal/src/PredictPeaks.cpp
@@ -216,7 +216,7 @@ void PredictPeaks::exec() {
   const Sample &sample = inputExperimentInfo->sample();
 
   // Retrieve the OrientedLattice (UnitCell) from the workspace
-  OrientedLattice orientedLattice = sample.getOrientedLattice();
+  const OrientedLattice &orientedLattice = sample.getOrientedLattice();
 
   // Get the UB matrix from it
   Matrix<double> ub(3, 3, true);
diff --git a/Framework/Crystal/src/SCDCalibratePanels.cpp b/Framework/Crystal/src/SCDCalibratePanels.cpp
index fdab7d7c0c83754edb0596d21fb2df1e09346f79..49491c640a0102d8b56cd513e4674ed7f18746d1 100644
--- a/Framework/Crystal/src/SCDCalibratePanels.cpp
+++ b/Framework/Crystal/src/SCDCalibratePanels.cpp
@@ -368,7 +368,7 @@ void SCDCalibratePanels::exec() {
           "Workspace2D", MyBankNames.size(), nPeaks, nPeaks);
   TofWksp->setInstrument(inst);
   OrientedLattice lattice = peaksWs->mutableSample().getOrientedLattice();
-  DblMatrix UB = lattice.getUB();
+  const DblMatrix &UB = lattice.getUB();
   // sort again since edge peaks can trace to other banks
   peaksWs->sort(criteria);
   PARALLEL_FOR_IF(Kernel::threadSafe(*ColWksp, *RowWksp, *TofWksp))
diff --git a/Framework/Crystal/src/ShowPossibleCells.cpp b/Framework/Crystal/src/ShowPossibleCells.cpp
index 237c467f75c75b457ec0e961a42a302b6fdd185a..cd77926624a207893e675d677678bcfe6aff6327 100644
--- a/Framework/Crystal/src/ShowPossibleCells.cpp
+++ b/Framework/Crystal/src/ShowPossibleCells.cpp
@@ -51,7 +51,7 @@ void ShowPossibleCells::exec() {
   }
 
   OrientedLattice o_lattice = ws->sample().getOrientedLattice();
-  Matrix<double> UB = o_lattice.getUB();
+  const Matrix<double> &UB = o_lattice.getUB();
 
   if (!IndexingUtils::CheckUB(UB)) {
     throw std::runtime_error(
diff --git a/Framework/CurveFitting/src/Algorithms/LeBailFunction.cpp b/Framework/CurveFitting/src/Algorithms/LeBailFunction.cpp
index a85af08502f8ccd97498e50cea3c1275831d541a..ae03de1ca92037d60a4f0ef2ab52d74b7cb80784 100644
--- a/Framework/CurveFitting/src/Algorithms/LeBailFunction.cpp
+++ b/Framework/CurveFitting/src/Algorithms/LeBailFunction.cpp
@@ -106,7 +106,7 @@ LeBailFunction::function(const Mantid::HistogramData::HistogramX &xvalues,
 
   // Reset output elements to zero
   std::vector<double> out(xvalues.size(), 0);
-  auto xvals = xvalues.rawData();
+  const auto &xvals = xvalues.rawData();
 
   // Peaks
   if (calpeaks) {
@@ -800,9 +800,7 @@ void LeBailFunction::groupPeaks(
         if (thispeak_rightbound < rightpeak_leftbound) {
           // this peak and its right peak are well separated.
           // finish this group by a copy
-          vector<pair<double, IPowderDiffPeakFunction_sptr>> peakgroupcopy =
-              peakgroup;
-          peakgroupvec.push_back(peakgroupcopy);
+          peakgroupvec.push_back(peakgroup);
           //  clear for the next group
           peakgroup.clear();
         } else {
@@ -812,9 +810,7 @@ void LeBailFunction::groupPeaks(
         }
       } else {
         // Rightmost peak.  Finish the current peak
-        vector<pair<double, IPowderDiffPeakFunction_sptr>> peakgroupcopy =
-            peakgroup;
-        peakgroupvec.push_back(peakgroupcopy);
+        peakgroupvec.push_back(peakgroup);
       }
 
       ++ipk;
@@ -827,17 +823,14 @@ void LeBailFunction::groupPeaks(
                           << "peak over at maximum TOF = " << xmax << ".\n";
 
       if (!peakgroup.empty()) {
-        vector<pair<double, IPowderDiffPeakFunction_sptr>> peakgroupcopy =
-            peakgroup;
-        peakgroupvec.push_back(peakgroupcopy);
+        peakgroupvec.push_back(peakgroup);
       }
     } // FIRST out of boundary
   }   // ENDWHILE
 
   while (ipk < m_numPeaks) {
     // Group peaks out of uppper boundary to a separate vector of peaks
-    IPowderDiffPeakFunction_sptr thispeak = m_dspPeakVec[ipk].second;
-    outboundpeakvec.push_back(thispeak);
+    outboundpeakvec.push_back(m_dspPeakVec[ipk].second);
     ipk += 1;
   }
 
diff --git a/Framework/CurveFitting/src/Algorithms/PlotPeakByLogValue.cpp b/Framework/CurveFitting/src/Algorithms/PlotPeakByLogValue.cpp
index 415298121a8ce27786df0925435175a46418e6e2..4eb75a48b86ee98e36df10758e40a1cb89fbb2e6 100644
--- a/Framework/CurveFitting/src/Algorithms/PlotPeakByLogValue.cpp
+++ b/Framework/CurveFitting/src/Algorithms/PlotPeakByLogValue.cpp
@@ -636,7 +636,7 @@ std::string PlotPeakByLogValue::getMinimizerString(const std::string &wsName,
     Mantid::API::WorkspaceProperty<> *wsProp =
         dynamic_cast<Mantid::API::WorkspaceProperty<> *>(minimizerProp);
     if (wsProp) {
-      std::string wsPropValue = minimizerProp->value();
+      const std::string &wsPropValue = minimizerProp->value();
       if (wsPropValue != "") {
         std::string wsPropName = minimizerProp->name();
         m_minimizerWorkspaces[wsPropName].push_back(wsPropValue);
diff --git a/Framework/DataHandling/src/ImggAggregateWavelengths.cpp b/Framework/DataHandling/src/ImggAggregateWavelengths.cpp
index 3b8d5948b6ab3a4abed85ba54449baa7b25199ec..52b42d4114fa7ef7bf6748b280b23b53e8abfec6 100644
--- a/Framework/DataHandling/src/ImggAggregateWavelengths.cpp
+++ b/Framework/DataHandling/src/ImggAggregateWavelengths.cpp
@@ -558,7 +558,7 @@ ImggAggregateWavelengths::findInputSubdirs(const Poco::Path &path) {
 
     // there is at least one image file: take just the first level directory
     if (it->isFile()) {
-      const std::string name = it.name();
+      const std::string &name = it.name();
       const std::string extShort = name.substr(name.size() - 3);
       const std::string extLong = name.substr(name.size() - 4);
 
diff --git a/Framework/DataHandling/src/Load.cpp b/Framework/DataHandling/src/Load.cpp
index aca068f9239cdd630ec367dcc7ebc106a6f4f066..188508e429f489c095527cc2b24033affc8d2534 100644
--- a/Framework/DataHandling/src/Load.cpp
+++ b/Framework/DataHandling/src/Load.cpp
@@ -245,7 +245,7 @@ void Load::declareLoaderProperties(const API::IAlgorithm_sptr &loader) {
   // THIS IS A COPY as the properties are mutated as we move through them
   const std::vector<Property *> existingProps = this->getProperties();
   for (auto existingProp : existingProps) {
-    const std::string name = existingProp->name();
+    const std::string &name = existingProp->name();
     // Wipe all properties except the Load native ones
     if (m_baseProps.find(name) == m_baseProps.end()) {
       this->removeProperty(name);
diff --git a/Framework/DataHandling/src/LoadEventNexus.cpp b/Framework/DataHandling/src/LoadEventNexus.cpp
index eb8d8b5b87486c429a91d1537401502391a9f899..e3234005c82866eec933462b992de2134885b255 100644
--- a/Framework/DataHandling/src/LoadEventNexus.cpp
+++ b/Framework/DataHandling/src/LoadEventNexus.cpp
@@ -1940,8 +1940,7 @@ void LoadEventNexus::runLoadMonitorsAsEvents(API::Progress *const prog) {
           << "data workspace.\n";
       try {
         auto to = m_ws->getSingleHeldWorkspace();
-        auto from = dataWS;
-        copyLogs(from, to);
+        copyLogs(dataWS, to);
         g_log.information() << "Log data copied.\n";
       } catch (std::runtime_error &) {
         g_log.error()
diff --git a/Framework/DataHandling/src/LoadFITS.cpp b/Framework/DataHandling/src/LoadFITS.cpp
index a941b625844d24513927862af2808607bd8c7576..282cd4e74df1b63adbc8ee37362be858b12707e8 100644
--- a/Framework/DataHandling/src/LoadFITS.cpp
+++ b/Framework/DataHandling/src/LoadFITS.cpp
@@ -472,19 +472,17 @@ void LoadFITS::doLoadFiles(const std::vector<std::string> &paths,
 
   // Create a group for these new workspaces, if the group already exists, add
   // to it.
-  std::string groupName = outWSName;
-
   size_t fileNumberInGroup = 0;
   WorkspaceGroup_sptr wsGroup;
 
-  if (!AnalysisDataService::Instance().doesExist(groupName)) {
-    wsGroup = WorkspaceGroup_sptr(new WorkspaceGroup());
-    wsGroup->setTitle(groupName);
+  if (!AnalysisDataService::Instance().doesExist(outWSName)) {
+    wsGroup = boost::make_shared<WorkspaceGroup>();
+    wsGroup->setTitle(outWSName);
   } else {
     // Get the name of the latest file in group to start numbering from
-    if (AnalysisDataService::Instance().doesExist(groupName))
+    if (AnalysisDataService::Instance().doesExist(outWSName))
       wsGroup =
-          AnalysisDataService::Instance().retrieveWS<WorkspaceGroup>(groupName);
+          AnalysisDataService::Instance().retrieveWS<WorkspaceGroup>(outWSName);
 
     std::string latestName = wsGroup->getNames().back();
     // Set next file number
diff --git a/Framework/DataHandling/src/LoadInstrument.cpp b/Framework/DataHandling/src/LoadInstrument.cpp
index 62d8c1a9269838bdc7002780b97177b273a5ef8f..7a6dfe77acd6378c00bb21733c7d2db169407eb8 100644
--- a/Framework/DataHandling/src/LoadInstrument.cpp
+++ b/Framework/DataHandling/src/LoadInstrument.cpp
@@ -270,7 +270,7 @@ std::string LoadInstrument::getFullPathParamIDF(std::string directoryName) {
   directoryPath.makeDirectory();
   // Remove the path from the filename
   Poco::Path filePath(m_filename);
-  std::string instrumentFile = filePath.getFileName();
+  const std::string &instrumentFile = filePath.getFileName();
 
   // First check whether there is a parameter file whose name is the same as the
   // IDF file,
diff --git a/Framework/DataHandling/src/LoadNXcanSAS.cpp b/Framework/DataHandling/src/LoadNXcanSAS.cpp
index 993bb6f8a0ac9ff2c25f7531249e9b99174e30fe..5fe552975b113bacb80386138314af75102146dc 100644
--- a/Framework/DataHandling/src/LoadNXcanSAS.cpp
+++ b/Framework/DataHandling/src/LoadNXcanSAS.cpp
@@ -131,7 +131,7 @@ std::string extractIdfFileOnCurrentSystem(std::string idf) {
 
   // Get the specified IDF name
   Poco::Path path(idf);
-  auto fileName = path.getFileName();
+  const auto &fileName = path.getFileName();
 
   // Compare against all available IDFs
   const std::vector<std::string> &directoryNames =
diff --git a/Framework/DataHandling/src/SaveGSS.cpp b/Framework/DataHandling/src/SaveGSS.cpp
index fa9c252fb9e2e7dc7b8e0bd1b9b5f747dfd3daaa..4c3668e1f5bf919cd879c8f3d4d8bc57009aebcc 100644
--- a/Framework/DataHandling/src/SaveGSS.cpp
+++ b/Framework/DataHandling/src/SaveGSS.cpp
@@ -160,8 +160,7 @@ void SaveGSS::exec() {
 
   // Check whether append or not
   if (!split) {
-    const std::string file(filename);
-    Poco::File fileobj(file);
+    Poco::File fileobj(filename);
     if (fileobj.exists() && !append) {
       // Non-append mode and will be overwritten
       g_log.warning() << "Target GSAS file " << filename
diff --git a/Framework/DataObjects/inc/MantidDataObjects/VectorColumn.h b/Framework/DataObjects/inc/MantidDataObjects/VectorColumn.h
index 2833c272232b313e357f7854965e2c0b71b9b3fd..26c868a2bc38d50ad5139c8a95ca6214ba2afc53 100644
--- a/Framework/DataObjects/inc/MantidDataObjects/VectorColumn.h
+++ b/Framework/DataObjects/inc/MantidDataObjects/VectorColumn.h
@@ -80,8 +80,7 @@ public:
     Mantid::Kernel::StringTokenizer elements(
         text, ",", Mantid::Kernel::StringTokenizer::TOK_TRIM);
 
-    for (const auto &it : elements) {
-      std::string element(it);
+    for (const auto &element : elements) {
       try {
         newValues.push_back(boost::lexical_cast<Type>(element));
       } catch (boost::bad_lexical_cast &) {
diff --git a/Framework/Geometry/src/Crystal/CompositeBraggScatterer.cpp b/Framework/Geometry/src/Crystal/CompositeBraggScatterer.cpp
index c36f94ac2505dd30f4194f7d4ddfa8b55362bab8..3e49afd85880d8f856895931d019b794cbbfd355 100644
--- a/Framework/Geometry/src/Crystal/CompositeBraggScatterer.cpp
+++ b/Framework/Geometry/src/Crystal/CompositeBraggScatterer.cpp
@@ -186,7 +186,7 @@ void CompositeBraggScatterer::redeclareProperties() {
     std::vector<Property *> properties =
         scatterer->getPropertiesInGroup(getPropagatingGroupName());
     for (auto &property : properties) {
-      std::string propertyName = property->name();
+      const std::string &propertyName = property->name();
       if (!existsProperty(propertyName)) {
         declareProperty(std::unique_ptr<Property>(property->clone()));
       }
diff --git a/Framework/Geometry/src/Instrument/InstrumentDefinitionParser.cpp b/Framework/Geometry/src/Instrument/InstrumentDefinitionParser.cpp
index ad4df1589551b08db77111481a7d00deb1a8f1a2..51dd5abb109248310af975973f3fddb2a53abb8c 100644
--- a/Framework/Geometry/src/Instrument/InstrumentDefinitionParser.cpp
+++ b/Framework/Geometry/src/Instrument/InstrumentDefinitionParser.cpp
@@ -753,7 +753,7 @@ Poco::XML::Element *InstrumentDefinitionParser::getParentComponent(
     const Poco::XML::Element *pLocElem) {
   if ((pLocElem->tagName()).compare("location") &&
       (pLocElem->tagName()).compare("locations")) {
-    std::string tagname = pLocElem->tagName();
+    const std::string &tagname = pLocElem->tagName();
     g_log.error("Argument to function getParentComponent must be a pointer to "
                 "an XML element with tag name location or locations.");
     throw std::logic_error(
diff --git a/Framework/Kernel/src/InstrumentInfo.cpp b/Framework/Kernel/src/InstrumentInfo.cpp
index 932712b44399942197ebe038026a7d2f50648ab4..7e3cda977f98bf3991fc496d8ee04011cd02a599 100644
--- a/Framework/Kernel/src/InstrumentInfo.cpp
+++ b/Framework/Kernel/src/InstrumentInfo.cpp
@@ -205,7 +205,7 @@ void InstrumentInfo::fillTechniques(const Poco::XML::Element *elem) {
     if (pNL->length() > 0) {
       Poco::XML::Text *txt = dynamic_cast<Poco::XML::Text *>(pNL->item(0));
       if (txt) {
-        std::string tech = txt->getData();
+        const std::string &tech = txt->getData();
         if (!tech.empty()) {
           m_technique.insert(tech);
         }
diff --git a/Framework/LiveData/src/SNSLiveEventDataListener.cpp b/Framework/LiveData/src/SNSLiveEventDataListener.cpp
index a3a2a57bb7e4095497e8055bd5b5611a797f9f5d..a24f2cf1b161882ff641ba4888e1a6322576866c 100644
--- a/Framework/LiveData/src/SNSLiveEventDataListener.cpp
+++ b/Framework/LiveData/src/SNSLiveEventDataListener.cpp
@@ -1198,7 +1198,7 @@ bool SNSLiveEventDataListener::rxPacket(const ADARA::AnnotationPkt &pkt) {
   } // mutex auto unlocks here
 
   // if there's a comment in the packet, log it at the info level
-  std::string comment = pkt.comment();
+  const std::string &comment = pkt.comment();
   if (comment.size() > 0) {
     g_log.information() << "Annotation: " << comment << '\n';
   }
diff --git a/Framework/MDAlgorithms/src/CompareMDWorkspaces.cpp b/Framework/MDAlgorithms/src/CompareMDWorkspaces.cpp
index 4223a88d247cf121b17b51b33020dc46cbff1658..e11d0a2a9c98131cf29363fb787b4066361e7c5d 100644
--- a/Framework/MDAlgorithms/src/CompareMDWorkspaces.cpp
+++ b/Framework/MDAlgorithms/src/CompareMDWorkspaces.cpp
@@ -178,8 +178,7 @@ void CompareMDWorkspaces::compareMDHistoWorkspaces(
 */
 template <typename MDE, size_t nd>
 void CompareMDWorkspaces::compareMDWorkspaces(
-    typename MDEventWorkspace<MDE, nd>::sptr ws) {
-  typename MDEventWorkspace<MDE, nd>::sptr ws1 = ws;
+    typename MDEventWorkspace<MDE, nd>::sptr ws1) {
   typename MDEventWorkspace<MDE, nd>::sptr ws2 =
       boost::dynamic_pointer_cast<MDEventWorkspace<MDE, nd>>(inWS2);
   if (!ws1 || !ws2)
diff --git a/Framework/MDAlgorithms/src/LoadILLAscii.cpp b/Framework/MDAlgorithms/src/LoadILLAscii.cpp
index e5cb0a709f132cdf732e78fb9f5c504e027c3954..589437c2d6779eb87385ee750fa55e59f09105de 100644
--- a/Framework/MDAlgorithms/src/LoadILLAscii.cpp
+++ b/Framework/MDAlgorithms/src/LoadILLAscii.cpp
@@ -270,7 +270,7 @@ IMDEventWorkspace_sptr LoadILLAscii::mergeWorkspaces(
     std::vector<API::MatrixWorkspace_sptr> &workspaceList) {
 
   Poco::TemporaryFile tmpFile;
-  std::string tempFileName = tmpFile.path();
+  const std::string &tempFileName = tmpFile.path();
   g_log.debug() << "Dumping WSs in a temp file: " << tempFileName << '\n';
 
   std::ofstream myfile;
diff --git a/Framework/MDAlgorithms/src/MergeMD.cpp b/Framework/MDAlgorithms/src/MergeMD.cpp
index bdcfb08fa19f636f73065f4945c8238fa8ec51f4..196133dd0b37db04b4ed9f5b0f45971fa00e3ce0 100644
--- a/Framework/MDAlgorithms/src/MergeMD.cpp
+++ b/Framework/MDAlgorithms/src/MergeMD.cpp
@@ -162,11 +162,10 @@ void MergeMD::createOutputWorkspace(std::vector<std::string> &inputs) {
  * @param ws ::  MDEventWorkspace to clone
  */
 template <typename MDE, size_t nd>
-void MergeMD::doPlus(typename MDEventWorkspace<MDE, nd>::sptr ws) {
+void MergeMD::doPlus(typename MDEventWorkspace<MDE, nd>::sptr ws2) {
   // CPUTimer tim;
   typename MDEventWorkspace<MDE, nd>::sptr ws1 =
       boost::dynamic_pointer_cast<MDEventWorkspace<MDE, nd>>(out);
-  typename MDEventWorkspace<MDE, nd>::sptr ws2 = ws;
   if (!ws1 || !ws2)
     throw std::runtime_error("Incompatible workspace types passed to MergeMD.");
 
diff --git a/Framework/MDAlgorithms/src/MinusMD.cpp b/Framework/MDAlgorithms/src/MinusMD.cpp
index 91d846e94bfed80b43ee710483bdbad9ba71188f..c0c2cb8e91ac001e301bb50730f765f7f7d4a0fb 100644
--- a/Framework/MDAlgorithms/src/MinusMD.cpp
+++ b/Framework/MDAlgorithms/src/MinusMD.cpp
@@ -51,8 +51,7 @@ void MinusMD::checkInputs() {
  * @param ws ::  MDEventWorkspace being added to
  */
 template <typename MDE, size_t nd>
-void MinusMD::doMinus(typename MDEventWorkspace<MDE, nd>::sptr ws) {
-  typename MDEventWorkspace<MDE, nd>::sptr ws1 = ws;
+void MinusMD::doMinus(typename MDEventWorkspace<MDE, nd>::sptr ws1) {
   typename MDEventWorkspace<MDE, nd>::sptr ws2 =
       boost::dynamic_pointer_cast<MDEventWorkspace<MDE, nd>>(m_operand_event);
   if (!ws1 || !ws2)
diff --git a/Framework/MDAlgorithms/src/PlusMD.cpp b/Framework/MDAlgorithms/src/PlusMD.cpp
index 3beb2ec6044ae32e080b86d1f3b56831c9c054f1..1fbe4b1d6b00551f2cdaa3e45e25a33fc06f007e 100644
--- a/Framework/MDAlgorithms/src/PlusMD.cpp
+++ b/Framework/MDAlgorithms/src/PlusMD.cpp
@@ -25,8 +25,7 @@ DECLARE_ALGORITHM(PlusMD)
  * @param ws ::  MDEventWorkspace being added to
  */
 template <typename MDE, size_t nd>
-void PlusMD::doPlus(typename MDEventWorkspace<MDE, nd>::sptr ws) {
-  typename MDEventWorkspace<MDE, nd>::sptr ws1 = ws;
+void PlusMD::doPlus(typename MDEventWorkspace<MDE, nd>::sptr ws1) {
   typename MDEventWorkspace<MDE, nd>::sptr ws2 =
       boost::dynamic_pointer_cast<MDEventWorkspace<MDE, nd>>(m_operand_event);
   if (!ws1 || !ws2)
diff --git a/Framework/MDAlgorithms/src/SlicingAlgorithm.cpp b/Framework/MDAlgorithms/src/SlicingAlgorithm.cpp
index 05d6ee29d070ee276d31ccd2334ce312d75661d1..3a820ca51608c949db0a65499bd03db3ed511edf 100644
--- a/Framework/MDAlgorithms/src/SlicingAlgorithm.cpp
+++ b/Framework/MDAlgorithms/src/SlicingAlgorithm.cpp
@@ -251,20 +251,19 @@ void SlicingAlgorithm::makeBasisVectorFromString(const std::string &str) {
   double binningScaling = double(numBins) / (lengthInInput);
 
   // Extract the arguments
-  std::string id = name;
   std::string units = Strings::strip(strs[0]);
 
   // Create the appropriate frame
   auto frame = createMDFrameForNonAxisAligned(units, basis);
 
   // Create the output dimension
-  MDHistoDimension_sptr out(
-      new MDHistoDimension(name, id, *frame, static_cast<coord_t>(min),
-                           static_cast<coord_t>(max), numBins));
+  auto out = boost::make_shared<MDHistoDimension>(
+      name, name, *frame, static_cast<coord_t>(min), static_cast<coord_t>(max),
+      numBins);
 
   // Put both in the algo for future use
   m_bases.push_back(basis);
-  m_binDimensions.push_back(out);
+  m_binDimensions.push_back(std::move(out));
   m_binningScaling.push_back(binningScaling);
   m_transformScaling.push_back(transformScaling);
 }
@@ -430,8 +429,7 @@ void SlicingAlgorithm::createGeneralTransform() {
   if (m_outD == inD) {
     // Can't reverse transform if you lost dimensions.
     auto ctTo = new DataObjects::CoordTransformAffine(inD, m_outD);
-    Matrix<coord_t> fromMatrix = ctFrom->getMatrix();
-    Matrix<coord_t> toMatrix = fromMatrix;
+    Matrix<coord_t> toMatrix = ctFrom->getMatrix();
     // Invert the affine matrix to get the reverse transformation
     toMatrix.Invert();
     ctTo->setMatrix(toMatrix);
diff --git a/Framework/RemoteAlgorithms/src/SCARFTomoReconstruction.cpp b/Framework/RemoteAlgorithms/src/SCARFTomoReconstruction.cpp
index 4b95f5de96ab2c5eaae91d49f66b3ce977df06e8..bc78aa0f4d7401e07350f63bafe186851ff3b526 100644
--- a/Framework/RemoteAlgorithms/src/SCARFTomoReconstruction.cpp
+++ b/Framework/RemoteAlgorithms/src/SCARFTomoReconstruction.cpp
@@ -1348,12 +1348,11 @@ void SCARFTomoReconstruction::getOneJobFile(const std::string &jobId,
       {"Content-Type", "application/xml"},
       {"Cookie", token},
       {"Accept", m_acceptType}};
-  std::string body = remotePath;
   int code;
   std::stringstream ss;
   try {
-    code = doSendRequestGetResponse(httpsURL, ss, headers,
-                                    Poco::Net::HTTPRequest::HTTP_GET, body);
+    code = doSendRequestGetResponse(
+        httpsURL, ss, headers, Poco::Net::HTTPRequest::HTTP_GET, remotePath);
   } catch (Kernel::Exception::InternetError &ie) {
     throw std::runtime_error(
         "Error while sending HTTP request to download a file: " +
diff --git a/Framework/RemoteJobManagers/src/MantidWebServiceAPIJobManager.cpp b/Framework/RemoteJobManagers/src/MantidWebServiceAPIJobManager.cpp
index ba53b73cd36280c297152f15dd2cf9273d9f6487..beb5de2fe487c257d36d7f2de6d0dc2562670300 100644
--- a/Framework/RemoteJobManagers/src/MantidWebServiceAPIJobManager.cpp
+++ b/Framework/RemoteJobManagers/src/MantidWebServiceAPIJobManager.cpp
@@ -369,8 +369,7 @@ std::string MantidWebServiceAPIJobManager::startRemoteTransaction() {
  * (remote) compute resource.
  */
 void MantidWebServiceAPIJobManager::stopRemoteTransaction(
-    const std::string &transactionID) {
-  std::string transId = transactionID;
+    const std::string &transId) {
   std::istream &respStream =
       httpGet("/transaction", std::string("Action=Stop&TransID=") + transId);
 
@@ -420,9 +419,8 @@ std::string MantidWebServiceAPIJobManager::submitRemoteJob(
   postData[runnable] = param;
 
   // Job name is optional
-  std::string jobName = taskName;
-  if (jobName.length() > 0) {
-    postData["JobName"] = jobName;
+  if (taskName.length() > 0) {
+    postData["JobName"] = taskName;
   }
 
   std::istream &respStream = httpPost("/submit", postData);