diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateCarpenterSampleCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateCarpenterSampleCorrection.h
index e9e9b151274ddf79eefd38258c6d4153989ccef5..cf03f02fb1612b74713cfe007c3508ea4336e917 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateCarpenterSampleCorrection.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateCarpenterSampleCorrection.h
@@ -1,20 +1,13 @@
 #ifndef MANTID_ALGORITHM_MULTIPLE_SCATTERING_ABSORPTION_H_
 #define MANTID_ALGORITHM_MULTIPLE_SCATTERING_ABSORPTION_H_
 
-#include "MantidAPI/AlgorithmManager.h"
-#include "MantidAPI/AnalysisDataService.h"
 #include "MantidAPI/DataProcessorAlgorithm.h"
-#include "MantidAPI/WorkspaceGroup.h"
-#include "MantidAPI/WorkspaceUnitValidator.h"
 #include "MantidHistogramData/Points.h"
 #include <vector>
 
+using namespace Mantid::API;
+
 namespace Mantid {
-namespace HistogramData {
-class HistogramX;
-class HistogramY;
-class HistogramE;
-}
 namespace Algorithms {
 /** Multiple scattering absorption correction, originally used to
     correct vanadium spectrum at IPNS.  Algorithm originally worked
@@ -84,12 +77,12 @@ private:
                                const HistogramData::Points &wavelength,
                                HistogramData::HistogramY &y_val);
 
-  API::MatrixWorkspace_sptr
-  createOutputWorkspace(const API::MatrixWorkspace_sptr inputWS,
+  MatrixWorkspace_sptr
+  createOutputWorkspace(const MatrixWorkspace_sptr &inputWS,
                         const std::string) const;
-  void deleteWorkspace(API::MatrixWorkspace_sptr workspace);
-  API::MatrixWorkspace_sptr
-  setUncertainties(API::MatrixWorkspace_sptr workspace);
+  void deleteWorkspace(MatrixWorkspace_sptr workspace);
+  MatrixWorkspace_sptr
+  setUncertainties(MatrixWorkspace_sptr workspace);
 };
 
 } // namespace Algorithm
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CarpenterSampleCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/CarpenterSampleCorrection.h
index 39a12122139654ca11e159db9d2a4c2b7541cf62..b93c822702bd697a192e89c9ff7d7d9349141017 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CarpenterSampleCorrection.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CarpenterSampleCorrection.h
@@ -1,7 +1,5 @@
 #ifndef MANTID_ALGORITHM_MULTIPLE_SCATTERING_ABSORPTION_H_
 #define MANTID_ALGORITHM_MULTIPLE_SCATTERING_ABSORPTION_H_
-#include "MantidAPI/AlgorithmManager.h"
-#include "MantidAPI/AnalysisDataService.h"
 #include "MantidAPI/DataProcessorAlgorithm.h"
 #include "MantidAPI/WorkspaceGroup.h"
 #include <vector>
@@ -9,11 +7,6 @@
 using namespace Mantid::API;
 
 namespace Mantid {
-namespace HistogramData {
-class HistogramX;
-class HistogramY;
-class HistogramE;
-}
 namespace Algorithms {
 /** Multiple scattering absorption correction, originally used to
     correct vanadium spectrum at IPNS.  Algorithm originally worked
diff --git a/Framework/Algorithms/src/CalculateCarpenterSampleCorrection.cpp b/Framework/Algorithms/src/CalculateCarpenterSampleCorrection.cpp
index 1e6fb5a5e98d8710e8361d9a10faaf586bee7fbc..aabd7a6ac8e598d9f81395800bd2193fa1b9ea53 100644
--- a/Framework/Algorithms/src/CalculateCarpenterSampleCorrection.cpp
+++ b/Framework/Algorithms/src/CalculateCarpenterSampleCorrection.cpp
@@ -1,5 +1,4 @@
 #include "MantidAlgorithms/CalculateCarpenterSampleCorrection.h"
-#include "MantidAPI/AlgorithmManager.h"
 #include "MantidAPI/InstrumentValidator.h"
 #include "MantidAPI/Sample.h"
 #include "MantidAPI/SpectrumInfo.h"
@@ -7,13 +6,9 @@
 #include "MantidAPI/WorkspaceGroup.h"
 #include "MantidAPI/WorkspaceUnitValidator.h"
 #include "MantidDataObjects/EventWorkspace.h"
-#include "MantidDataObjects/Workspace2D.h"
-#include "MantidDataObjects/WorkspaceCreation.h"
 #include "MantidGeometry/Instrument.h"
-#include "MantidGeometry/IComponent.h"
 #include "MantidKernel/CompositeValidator.h"
 #include "MantidKernel/Material.h"
-#include "MantidKernel/PhysicalConstants.h"
 
 #include <stdexcept>
 
@@ -25,14 +20,9 @@ DECLARE_ALGORITHM(CalculateCarpenterSampleCorrection) // Register the class
 
 using namespace Kernel;
 using namespace API;
-using Mantid::DataObjects::EventList;
 using Mantid::DataObjects::EventWorkspace;
 using Mantid::DataObjects::EventWorkspace_sptr;
-using Mantid::DataObjects::WeightedEventNoTime;
-using Mantid::DataObjects::Workspace2D;
-using Mantid::HistogramData::HistogramX;
 using Mantid::HistogramData::HistogramY;
-using Mantid::HistogramData::HistogramE;
 using Mantid::HistogramData::Points;
 using std::vector;
 using namespace Mantid::PhysicalConstants;
@@ -433,7 +423,7 @@ void CalculateCarpenterSampleCorrection::calculate_ms_correction(
 }
 
 MatrixWorkspace_sptr CalculateCarpenterSampleCorrection::createOutputWorkspace(
-    const MatrixWorkspace_sptr inputWksp, const std::string ylabel) const {
+    const MatrixWorkspace_sptr &inputWksp, const std::string ylabel) const {
   MatrixWorkspace_sptr outputWS =
       WorkspaceFactory::Instance().create(inputWksp);
   // The algorithm computes the signal values at bin centres so they should
diff --git a/Framework/Algorithms/src/CarpenterSampleCorrection.cpp b/Framework/Algorithms/src/CarpenterSampleCorrection.cpp
index c420182d49f52b5cde6ef3146994ef617e6deb07..b5509616008195ee26d31f66a653e2838d024b21 100644
--- a/Framework/Algorithms/src/CarpenterSampleCorrection.cpp
+++ b/Framework/Algorithms/src/CarpenterSampleCorrection.cpp
@@ -1,16 +1,8 @@
 #include "MantidAlgorithms/CarpenterSampleCorrection.h"
-#include "MantidAPI/AlgorithmManager.h"
 #include "MantidAPI/InstrumentValidator.h"
-#include "MantidAPI/Sample.h"
-#include "MantidAPI/SpectrumInfo.h"
-#include "MantidAPI/WorkspaceFactory.h"
 #include "MantidAPI/WorkspaceUnitValidator.h"
 #include "MantidDataObjects/EventWorkspace.h"
-#include "MantidGeometry/Instrument.h"
-#include "MantidGeometry/IComponent.h"
 #include "MantidKernel/CompositeValidator.h"
-#include "MantidKernel/Material.h"
-#include "MantidKernel/PhysicalConstants.h"
 
 #include <stdexcept>
 
@@ -22,15 +14,10 @@ DECLARE_ALGORITHM(CarpenterSampleCorrection) // Register the class
 
 using namespace Kernel;
 using namespace API;
-using Mantid::DataObjects::EventList;
 using Mantid::DataObjects::EventWorkspace;
 using Mantid::DataObjects::EventWorkspace_sptr;
-using Mantid::DataObjects::WeightedEventNoTime;
-using Mantid::HistogramData::HistogramX;
-using Mantid::HistogramData::HistogramY;
-using Mantid::HistogramData::HistogramE;
 using std::vector;
-using namespace Mantid::PhysicalConstants;
+//using namespace Mantid::PhysicalConstants;
 using namespace Geometry;
 
 const std::string CarpenterSampleCorrection::name() const {
diff --git a/Framework/Algorithms/test/CalculateCarpenterSampleCorrectionTest.h b/Framework/Algorithms/test/CalculateCarpenterSampleCorrectionTest.h
index e27f5808a3b111a695609556b32c55c566c62411..45ca6916054de6696288503eea083415cd464966 100644
--- a/Framework/Algorithms/test/CalculateCarpenterSampleCorrectionTest.h
+++ b/Framework/Algorithms/test/CalculateCarpenterSampleCorrectionTest.h
@@ -5,11 +5,10 @@
 #include <vector>
 
 #include "MantidAlgorithms/CalculateCarpenterSampleCorrection.h"
-#include "MantidDataObjects/EventWorkspace.h"
 #include "MantidDataObjects/WorkspaceCreation.h"
-#include "MantidAPI/AnalysisDataService.h"
 #include "MantidAPI/Axis.h"
 #include "MantidAPI/FrameworkManager.h"
+#include "MantidAPI/WorkspaceGroup.h"
 #include "MantidIndexing/IndexInfo.h"
 #include "MantidHistogramData/LinearGenerator.h"
 #include "MantidTestHelpers/WorkspaceCreationHelper.h"