From 58dfb4b392a5c2f1ac135ffdb312e65cb1393ac9 Mon Sep 17 00:00:00 2001
From: Federico Montesino Pouzols <federico.montesino-pouzols@stfc.ac.uk>
Date: Thu, 11 Feb 2016 13:00:05 +0000
Subject: [PATCH] algorithms: update includes for changes in MatrixWorkspace,
 re #15246

---
 .../inc/MantidAlgorithms/AbsorptionCorrection.h   | 11 +++++++++++
 .../Algorithms/inc/MantidAlgorithms/AddNote.h     |  1 +
 .../inc/MantidAlgorithms/AddTimeSeriesLog.h       |  5 +++++
 .../inc/MantidAlgorithms/ApplyCalibration.h       |  1 +
 .../inc/MantidAlgorithms/CalMuonDetectorPhases.h  |  2 ++
 .../inc/MantidAlgorithms/ConvertAxesToRealSpace.h |  1 +
 .../ConvertUnitsUsingDetectorTable.h              |  1 +
 .../Algorithms/inc/MantidAlgorithms/CopyLogs.h    |  5 +++++
 .../inc/MantidAlgorithms/DetectorEfficiencyCor.h  |  6 +-----
 .../MantidAlgorithms/DetectorEfficiencyCorUser.h  |  2 +-
 .../inc/MantidAlgorithms/ExtractMaskToTable.h     |  1 +
 .../inc/MantidAlgorithms/FindPeakBackground.h     |  2 +-
 .../Algorithms/inc/MantidAlgorithms/FindPeaks.h   |  1 +
 .../Algorithms/inc/MantidAlgorithms/FitPeak.h     |  1 +
 .../Algorithms/inc/MantidAlgorithms/GetAllEi.h    |  4 ++++
 Framework/Algorithms/inc/MantidAlgorithms/GetEi.h |  3 ++-
 .../Algorithms/inc/MantidAlgorithms/GetEi2.h      |  1 +
 .../inc/MantidAlgorithms/He3TubeEfficiency.h      | 11 +++++++++--
 .../Algorithms/inc/MantidAlgorithms/IQTransform.h |  8 ++++++++
 .../inc/MantidAlgorithms/InterpolatingRebin.h     |  1 +
 .../inc/MantidAlgorithms/MaskDetectorsIf.h        |  1 +
 .../Algorithms/inc/MantidAlgorithms/MaxEnt.h      |  2 ++
 .../inc/MantidAlgorithms/ModeratorTzero.h         |  1 +
 .../inc/MantidAlgorithms/ModeratorTzeroLinear.h   |  1 +
 .../MantidAlgorithms/MonitorEfficiencyCorUser.h   |  2 +-
 .../inc/MantidAlgorithms/MonteCarloAbsorption.h   | 11 +++++++++++
 .../inc/MantidAlgorithms/NormaliseToMonitor.h     |  1 +
 .../PDDetermineCharacterizations.h                |  4 ++++
 .../inc/MantidAlgorithms/PhaseQuadMuon.h          |  2 ++
 Framework/Algorithms/inc/MantidAlgorithms/Q1D2.h  |  2 +-
 .../ReflectometryReductionOneAuto.h               |  4 +++-
 .../inc/MantidAlgorithms/RemoveBackground.h       |  9 +++++++++
 .../Algorithms/inc/MantidAlgorithms/RemoveBins.h  |  2 ++
 .../inc/MantidAlgorithms/RemoveExpDecay.h         |  2 +-
 .../Algorithms/inc/MantidAlgorithms/ResampleX.h   |  1 +
 .../Algorithms/inc/MantidAlgorithms/SmoothData.h  |  1 +
 .../inc/MantidAlgorithms/SpatialGrouping.h        |  1 +
 .../inc/MantidAlgorithms/SphericalAbsorption.h    | 15 +++++++++++++++
 .../Algorithms/inc/MantidAlgorithms/Stitch1D.h    |  3 ++-
 .../Algorithms/inc/MantidAlgorithms/Transpose.h   |  6 ++++++
 .../inc/MantidAlgorithms/UnwrapMonitor.h          |  1 +
 .../MantidAlgorithms/VesuvioL1ThetaResolution.h   |  2 ++
 .../inc/MantidAlgorithms/WienerSmooth.h           |  2 +-
 .../inc/MantidAlgorithms/XDataConverter.h         |  1 +
 Framework/Algorithms/src/AbsorptionCorrection.cpp |  2 ++
 Framework/Algorithms/src/AddNote.cpp              |  1 +
 Framework/Algorithms/src/AddPeak.cpp              |  7 +++++--
 Framework/Algorithms/src/AddSampleLog.cpp         |  3 +++
 Framework/Algorithms/src/AddTimeSeriesLog.cpp     |  2 ++
 Framework/Algorithms/src/AlignDetectors.cpp       |  5 ++++-
 Framework/Algorithms/src/AlphaCalc.cpp            |  7 ++++---
 Framework/Algorithms/src/AnyShapeAbsorption.cpp   |  1 +
 Framework/Algorithms/src/ApplyDeadTimeCorr.cpp    |  8 +++++---
 Framework/Algorithms/src/AsymmetryCalc.cpp        |  7 ++++---
 Framework/Algorithms/src/AverageLogData.cpp       |  3 +++
 Framework/Algorithms/src/BinaryOperation.cpp      |  7 ++++---
 Framework/Algorithms/src/CalMuonDeadTime.cpp      |  7 ++++---
 .../Algorithms/src/CalMuonDetectorPhases.cpp      |  2 ++
 Framework/Algorithms/src/CalculateSlits.cpp       |  1 -
 Framework/Algorithms/src/ChangeBinOffset.cpp      |  2 ++
 .../Algorithms/src/ClearInstrumentParameters.cpp  |  1 +
 Framework/Algorithms/src/ClearMaskFlag.cpp        |  3 +++
 Framework/Algorithms/src/ConvertEmptyToTof.cpp    |  1 +
 .../src/ConvertTableToMatrixWorkspace.cpp         |  3 +++
 Framework/Algorithms/src/ConvertToHistogram.cpp   |  1 +
 Framework/Algorithms/src/ConvertToPointData.cpp   |  1 +
 Framework/Algorithms/src/ConvertUnits.cpp         |  1 +
 .../src/ConvertUnitsUsingDetectorTable.cpp        |  2 ++
 Framework/Algorithms/src/CopyDetectorMapping.cpp  |  1 +
 .../Algorithms/src/CopyInstrumentParameters.cpp   |  1 +
 Framework/Algorithms/src/CopyLogs.cpp             |  3 +++
 Framework/Algorithms/src/CorrectToFile.cpp        |  2 ++
 .../Algorithms/src/CreateLogPropertyTable.cpp     | 15 +++++++++------
 .../Algorithms/src/CreateLogTimeCorrection.cpp    |  6 ++++--
 .../Algorithms/src/CreateSampleWorkspace.cpp      |  8 +++++---
 Framework/Algorithms/src/CreateWorkspace.cpp      |  1 +
 Framework/Algorithms/src/CropWorkspace.cpp        |  1 +
 Framework/Algorithms/src/CylinderAbsorption.cpp   |  1 +
 Framework/Algorithms/src/DeleteLog.cpp            |  1 +
 .../Algorithms/src/DetectorEfficiencyCor.cpp      |  1 +
 Framework/Algorithms/src/DiffractionFocussing.cpp |  5 ++++-
 .../Algorithms/src/DiffractionFocussing2.cpp      |  1 +
 .../Algorithms/src/EditInstrumentGeometry.cpp     |  1 +
 Framework/Algorithms/src/ElasticWindow.cpp        |  1 +
 .../src/EstimateResolutionDiffraction.cpp         |  3 ++-
 Framework/Algorithms/src/ExportTimeSeriesLog.cpp  |  1 +
 Framework/Algorithms/src/ExtractFFTSpectrum.cpp   |  3 +++
 .../Algorithms/src/ExtractSingleSpectrum.cpp      |  1 +
 Framework/Algorithms/src/FFT.cpp                  |  3 ++-
 Framework/Algorithms/src/FFTDerivative.cpp        |  3 ++-
 Framework/Algorithms/src/FFTSmooth.cpp            |  2 ++
 Framework/Algorithms/src/FFTSmooth2.cpp           |  8 +++++---
 Framework/Algorithms/src/FindDeadDetectors.cpp    |  5 +++--
 Framework/Algorithms/src/FlatPlateAbsorption.cpp  |  1 +
 .../src/GeneralisedSecondDifference.cpp           | 10 ++++++----
 Framework/Algorithms/src/GetAllEi.cpp             | 12 +++++++-----
 .../Algorithms/src/HRPDSlabCanAbsorption.cpp      |  1 +
 Framework/Algorithms/src/He3TubeEfficiency.cpp    |  2 ++
 Framework/Algorithms/src/IQTransform.cpp          |  3 +++
 Framework/Algorithms/src/InterpolatingRebin.cpp   |  3 +++
 Framework/Algorithms/src/MaskDetectorsIf.cpp      |  1 +
 Framework/Algorithms/src/MaxEnt.cpp               |  2 +-
 Framework/Algorithms/src/MergeRuns.cpp            |  4 +++-
 Framework/Algorithms/src/ModeratorTzero.cpp       |  1 +
 Framework/Algorithms/src/ModeratorTzeroLinear.cpp |  1 +
 .../Algorithms/src/MonitorEfficiencyCorUser.cpp   |  1 +
 Framework/Algorithms/src/MonteCarloAbsorption.cpp |  1 +
 Framework/Algorithms/src/MultiplyRange.cpp        |  1 +
 Framework/Algorithms/src/MuonGroupDetectors.cpp   |  1 +
 .../src/PDDetermineCharacterizations.cpp          |  1 +
 Framework/Algorithms/src/PDFFourierTransform.cpp  |  2 ++
 Framework/Algorithms/src/PhaseQuadMuon.cpp        |  5 +++--
 .../Algorithms/src/PointByPointVCorrection.cpp    |  3 +++
 .../Algorithms/src/PolarizationCorrection.cpp     | 13 ++++++++-----
 Framework/Algorithms/src/Q1D2.cpp                 |  1 +
 Framework/Algorithms/src/Q1DWeighted.cpp          |  1 +
 Framework/Algorithms/src/Qhelper.cpp              |  1 +
 Framework/Algorithms/src/RRFMuon.cpp              |  2 ++
 Framework/Algorithms/src/RadiusSum.cpp            |  9 ++++++---
 Framework/Algorithms/src/Rebin.cpp                |  1 +
 Framework/Algorithms/src/RebinByTimeAtSample.cpp  |  2 ++
 Framework/Algorithms/src/RebinByTimeBase.cpp      |  1 +
 Framework/Algorithms/src/Rebunch.cpp              |  8 +++++---
 .../Algorithms/src/ReflectometryReductionOne.cpp  |  1 +
 Framework/Algorithms/src/Regroup.cpp              |  5 +++--
 Framework/Algorithms/src/RemoveBackground.cpp     |  1 +
 Framework/Algorithms/src/RemoveBins.cpp           |  3 +++
 Framework/Algorithms/src/RemoveExpDecay.cpp       | 11 ++++++-----
 Framework/Algorithms/src/RenameWorkspace.cpp      |  1 +
 Framework/Algorithms/src/ResampleX.cpp            |  2 ++
 Framework/Algorithms/src/SassenaFFT.cpp           | 11 +++++++----
 Framework/Algorithms/src/Scale.cpp                |  1 +
 Framework/Algorithms/src/ScaleX.cpp               |  1 +
 .../Algorithms/src/SetInstrumentParameter.cpp     |  1 +
 Framework/Algorithms/src/SetUncertainties.cpp     |  2 ++
 Framework/Algorithms/src/ShiftLogTime.cpp         |  2 ++
 Framework/Algorithms/src/SolidAngle.cpp           |  1 +
 .../src/SpecularReflectionAlgorithm.cpp           |  2 +-
 .../src/SpecularReflectionCalculateTheta.cpp      |  2 ++
 .../src/SpecularReflectionPositionCorrect.cpp     |  2 ++
 Framework/Algorithms/src/SphericalAbsorption.cpp  |  1 +
 Framework/Algorithms/src/StripPeaks.cpp           |  6 ++++--
 Framework/Algorithms/src/StripVanadiumPeaks.cpp   |  1 +
 Framework/Algorithms/src/StripVanadiumPeaks2.cpp  |  4 +++-
 Framework/Algorithms/src/SumEventsByLogValue.cpp  |  9 ++++++---
 Framework/Algorithms/src/SumRowColumn.cpp         |  3 +++
 Framework/Algorithms/src/UnwrapMonitor.cpp        |  1 +
 .../Algorithms/src/VesuvioL1ThetaResolution.cpp   |  1 +
 Framework/Algorithms/src/WienerSmooth.cpp         |  2 ++
 Framework/Algorithms/src/WorkspaceJoiners.cpp     |  2 ++
 Framework/Algorithms/src/XDataConverter.cpp       |  2 ++
 151 files changed, 380 insertions(+), 97 deletions(-)

diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AbsorptionCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/AbsorptionCorrection.h
index 80f690a25b9..6de69b4f615 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/AbsorptionCorrection.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/AbsorptionCorrection.h
@@ -5,8 +5,19 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidGeometry/IDTypes.h"
+#include "MantidGeometry/IDetector.h"
 
 namespace Mantid {
+
+namespace API {
+class Sample;
+}
+namespace Geometry {
+class Object;
+}
+
 namespace Algorithms {
 /** A base class for absorption correction algorithms.
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AddNote.h b/Framework/Algorithms/inc/MantidAlgorithms/AddNote.h
index 2e2c850088a..7d70a17909c 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/AddNote.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/AddNote.h
@@ -3,6 +3,7 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/DeprecatedAlgorithm.h"
+#include "MantidAPI/Run.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AddTimeSeriesLog.h b/Framework/Algorithms/inc/MantidAlgorithms/AddTimeSeriesLog.h
index 98d9e3538b1..1563b61bc51 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/AddTimeSeriesLog.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/AddTimeSeriesLog.h
@@ -4,6 +4,11 @@
 #include "MantidAPI/Algorithm.h"
 
 namespace Mantid {
+
+namespace API {
+class Run;
+}
+
 namespace Algorithms {
 
 /**
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ApplyCalibration.h b/Framework/Algorithms/inc/MantidAlgorithms/ApplyCalibration.h
index 82d3e2cba72..184479cb6b4 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ApplyCalibration.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ApplyCalibration.h
@@ -5,6 +5,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidGeometry/Instrument.h"
 
 namespace Mantid {
 //----------------------------------------------------------------------
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalMuonDetectorPhases.h b/Framework/Algorithms/inc/MantidAlgorithms/CalMuonDetectorPhases.h
index 1f5b4be4663..5e90778fdc4 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CalMuonDetectorPhases.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CalMuonDetectorPhases.h
@@ -3,6 +3,8 @@
 
 #include "MantidAlgorithms/DllConfig.h"
 #include "MantidAPI/Algorithm.h"
+#include "MantidAPI/ITableWorkspace_fwd.h"
+
 namespace Mantid {
 namespace Algorithms {
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertAxesToRealSpace.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertAxesToRealSpace.h
index 4fe3e89e899..31e5da93ea0 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertAxesToRealSpace.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertAxesToRealSpace.h
@@ -3,6 +3,7 @@
 
 #include "MantidKernel/System.h"
 #include "MantidAPI/Algorithm.h"
+#include "MantidKernel/cow_ptr.h"
 
 #include <map>
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertUnitsUsingDetectorTable.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertUnitsUsingDetectorTable.h
index c61f955f40b..185769752a6 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertUnitsUsingDetectorTable.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertUnitsUsingDetectorTable.h
@@ -3,6 +3,7 @@
 
 #include "MantidKernel/System.h"
 #include "MantidAPI/Algorithm.h"
+#include "MantidKernel/Unit.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CopyLogs.h b/Framework/Algorithms/inc/MantidAlgorithms/CopyLogs.h
index 2679d490f4b..1f7aa13f32a 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CopyLogs.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CopyLogs.h
@@ -5,6 +5,11 @@
 #include "MantidAPI/Algorithm.h"
 
 namespace Mantid {
+
+namespace API {
+class Run;
+}
+
 namespace Algorithms {
 
 /** CopyLogs
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyCor.h b/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyCor.h
index b704249198e..9f5b0cf7271 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyCor.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyCor.h
@@ -3,11 +3,7 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidKernel/V3D.h"
-#include <climits>
-#include <list>
-#include <map>
-#include <string>
-#include <vector>
+#include "MantidGeometry/IDetector.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyCorUser.h b/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyCorUser.h
index ee52e8d2b30..b3dcd296d74 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyCorUser.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyCorUser.h
@@ -1,8 +1,8 @@
 #ifndef MANTID_ALGORITHMS_DETECTOREFFICIENCYCORUSER_H_
 #define MANTID_ALGORITHMS_DETECTOREFFICIENCYCORUSER_H_
 
-#include "MantidKernel/System.h"
 #include "MantidAPI/Algorithm.h"
+#include "MantidKernel/cow_ptr.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ExtractMaskToTable.h b/Framework/Algorithms/inc/MantidAlgorithms/ExtractMaskToTable.h
index 5ea14e605d7..4daa0eb1a74 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ExtractMaskToTable.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ExtractMaskToTable.h
@@ -5,6 +5,7 @@
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
 #include "MantidDataObjects/TableWorkspace.h"
+#include "MantidGeometry/IDTypes.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FindPeakBackground.h b/Framework/Algorithms/inc/MantidAlgorithms/FindPeakBackground.h
index e29dd69b107..921654c9bab 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/FindPeakBackground.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/FindPeakBackground.h
@@ -1,8 +1,8 @@
 #ifndef MANTID_ALGORITHMS_FindPeakBackground_H_
 #define MANTID_ALGORITHMS_FindPeakBackground_H_
 
-#include "MantidKernel/System.h"
 #include "MantidAPI/Algorithm.h"
+#include "MantidKernel/cow_ptr.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FindPeaks.h b/Framework/Algorithms/inc/MantidAlgorithms/FindPeaks.h
index 5ae71ab4c77..657a9df19f8 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/FindPeaks.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/FindPeaks.h
@@ -10,6 +10,7 @@
 #include "MantidAPI/IPeakFunction.h"
 #include "MantidAPI/IBackgroundFunction.h"
 #include "MantidDataObjects/TableWorkspace.h"
+#include "MantidKernel/cow_ptr.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FitPeak.h b/Framework/Algorithms/inc/MantidAlgorithms/FitPeak.h
index 8dadd2b9d86..e9727bd9386 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/FitPeak.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/FitPeak.h
@@ -7,6 +7,7 @@
 #include "MantidAPI/IPeakFunction.h"
 #include "MantidAPI/IBackgroundFunction.h"
 #include "MantidDataObjects/TableWorkspace.h"
+#include "MantidKernel/cow_ptr.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GetAllEi.h b/Framework/Algorithms/inc/MantidAlgorithms/GetAllEi.h
index 3d40bc4a7fd..aa632e9a47a 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/GetAllEi.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/GetAllEi.h
@@ -9,6 +9,10 @@
 
 namespace Mantid {
 
+namespace Kernel {
+class Unit;
+}
+
 namespace Algorithms {
 
 /** Estimate all incident energies, used by chopper instrument.
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GetEi.h b/Framework/Algorithms/inc/MantidAlgorithms/GetEi.h
index d725b1c49d5..b323608f231 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/GetEi.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/GetEi.h
@@ -5,7 +5,8 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidKernel/cow_ptr.h"
+#include "MantidGeometry/IDTypes.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GetEi2.h b/Framework/Algorithms/inc/MantidAlgorithms/GetEi2.h
index a10e88a84a8..8ffe0442349 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/GetEi2.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/GetEi2.h
@@ -6,6 +6,7 @@
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidKernel/cow_ptr.h"
 #include "MantidKernel/System.h"
 
 namespace Mantid {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/He3TubeEfficiency.h b/Framework/Algorithms/inc/MantidAlgorithms/He3TubeEfficiency.h
index 57e74c8521a..3d5d0439ef4 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/He3TubeEfficiency.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/He3TubeEfficiency.h
@@ -3,10 +3,17 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidKernel/V3D.h"
-#include <map>
-#include <vector>
+#include "MantidGeometry/IDTypes.h"
 
 namespace Mantid {
+
+// forward declarations
+namespace Geometry {
+class IDetector;
+class Object;
+class ParameterMap;
+}
+
 namespace Algorithms {
 /**
     Corrects the input workspace for helium3 tube efficiency based on an
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/IQTransform.h b/Framework/Algorithms/inc/MantidAlgorithms/IQTransform.h
index 84be4a8297b..048273b7c7b 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/IQTransform.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/IQTransform.h
@@ -5,8 +5,16 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidKernel/cow_ptr.h"
 
 namespace Mantid {
+
+namespace Kernel {
+namespace Units {
+class Label;
+}
+}
+
 namespace Algorithms {
 /** This algorithm permits the linearisation of reduced SANS data by applying a
    chosen transformation
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/InterpolatingRebin.h b/Framework/Algorithms/inc/MantidAlgorithms/InterpolatingRebin.h
index 894b0a56208..29be887f569 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/InterpolatingRebin.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/InterpolatingRebin.h
@@ -5,6 +5,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/Rebin.h"
+#include "MantidKernel/cow_ptr.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaskDetectorsIf.h b/Framework/Algorithms/inc/MantidAlgorithms/MaskDetectorsIf.h
index 04e87338660..e0db3aa4a00 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/MaskDetectorsIf.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/MaskDetectorsIf.h
@@ -5,6 +5,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidGeometry/IDTypes.h"
 #include "MantidKernel/System.h"
 #include <boost/function.hpp>
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt.h b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt.h
index 5791a704942..4e7b315ec2e 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt.h
@@ -3,6 +3,8 @@
 
 #include "MantidAlgorithms/DllConfig.h"
 #include "MantidAPI/Algorithm.h"
+#include "MantidKernel/Matrix.h"
+
 namespace Mantid {
 namespace Algorithms {
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ModeratorTzero.h b/Framework/Algorithms/inc/MantidAlgorithms/ModeratorTzero.h
index 61b9ec3017d..dc38b6fa43c 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ModeratorTzero.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ModeratorTzero.h
@@ -6,6 +6,7 @@
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
 #include "MantidKernel/PhysicalConstants.h"
+#include "MantidGeometry/Instrument.h"
 #include "MantidGeometry/muParser_Silent.h"
 
 namespace Mantid {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ModeratorTzeroLinear.h b/Framework/Algorithms/inc/MantidAlgorithms/ModeratorTzeroLinear.h
index 7b5a6ce6259..d31bb9f1b52 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ModeratorTzeroLinear.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ModeratorTzeroLinear.h
@@ -5,6 +5,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidGeometry/Instrument.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MonitorEfficiencyCorUser.h b/Framework/Algorithms/inc/MantidAlgorithms/MonitorEfficiencyCorUser.h
index 3c029217c23..4f8b3441475 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/MonitorEfficiencyCorUser.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/MonitorEfficiencyCorUser.h
@@ -1,8 +1,8 @@
 #ifndef MANTID_ALGORITHMS_MONITOREFFICIENCYCORUSER_H_
 #define MANTID_ALGORITHMS_MONITOREFFICIENCYCORUSER_H_
 
-#include "MantidKernel/System.h"
 #include "MantidAPI/Algorithm.h"
+#include "MantidKernel/cow_ptr.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MonteCarloAbsorption.h b/Framework/Algorithms/inc/MantidAlgorithms/MonteCarloAbsorption.h
index f571dcf823a..ac4070826d0 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/MonteCarloAbsorption.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/MonteCarloAbsorption.h
@@ -6,10 +6,21 @@
 //------------------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
 #include "MantidGeometry/IComponent.h"
+#include "MantidKernel/cow_ptr.h"
 
 #include <boost/random/mersenne_twister.hpp>
 
 namespace Mantid {
+
+// forward declarations from other Mantid modules
+namespace Kernel {
+class Material;
+}
+
+namespace API {
+class SampleEnvironment;
+}
+
 namespace Geometry {
 class IDetector;
 class Object;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/NormaliseToMonitor.h b/Framework/Algorithms/inc/MantidAlgorithms/NormaliseToMonitor.h
index b7b042c5fbd..171e8454265 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/NormaliseToMonitor.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/NormaliseToMonitor.h
@@ -5,6 +5,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidKernel/cow_ptr.h"
 #include "MantidKernel/IPropertyManager.h"
 
 namespace Mantid {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/PDDetermineCharacterizations.h b/Framework/Algorithms/inc/MantidAlgorithms/PDDetermineCharacterizations.h
index 76b6145a126..130f7cb8a30 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/PDDetermineCharacterizations.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/PDDetermineCharacterizations.h
@@ -7,6 +7,10 @@
 
 namespace Mantid {
 
+namespace API {
+class Run;
+}
+
 namespace Kernel {
 /// forward declaration
 class PropertyMantager;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/PhaseQuadMuon.h b/Framework/Algorithms/inc/MantidAlgorithms/PhaseQuadMuon.h
index 3d08342a63d..216e45031ca 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/PhaseQuadMuon.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/PhaseQuadMuon.h
@@ -5,6 +5,8 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAPI/ITableWorkspace_fwd.h"
+#include "MantidAPI/MatrixWorkspace_fwd.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Q1D2.h b/Framework/Algorithms/inc/MantidAlgorithms/Q1D2.h
index e9948ce5714..48540d3feaf 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Q1D2.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Q1D2.h
@@ -5,7 +5,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
-#include "MantidAlgorithms/GravitySANSHelper.h"
+#include "MantidKernel/cow_ptr.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOneAuto.h b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOneAuto.h
index fe3f3f35805..e04f5dc708b 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOneAuto.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOneAuto.h
@@ -1,9 +1,11 @@
 #ifndef MANTID_ALGORITHMS_REFLECTOMETRYREDUCTIONONEAUTO_H_
 #define MANTID_ALGORITHMS_REFLECTOMETRYREDUCTIONONEAUTO_H_
 
-#include "MantidKernel/System.h"
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/DataProcessorAlgorithm.h"
+#include "MantidGeometry/Instrument.h"
+#include "MantidKernel/System.h"
+
 #include <boost/optional.hpp>
 
 namespace Mantid {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RemoveBackground.h b/Framework/Algorithms/inc/MantidAlgorithms/RemoveBackground.h
index aafd5eb23da..bad5b7ccfe7 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/RemoveBackground.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/RemoveBackground.h
@@ -5,7 +5,16 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidKernel/cow_ptr.h"
+#include "MantidGeometry/IComponent.h"
+
 namespace Mantid {
+
+// forward declarations from other Mantid modules
+namespace Kernel {
+class Unit;
+}
+
 namespace Algorithms {
 /** Performs removal of constant (and possibly non-constant after simple
 modification) background calculated in TOF units
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RemoveBins.h b/Framework/Algorithms/inc/MantidAlgorithms/RemoveBins.h
index c8dc0bd2658..ce7294f1957 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/RemoveBins.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/RemoveBins.h
@@ -5,6 +5,8 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidKernel/cow_ptr.h"
+#include "MantidKernel/Unit.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RemoveExpDecay.h b/Framework/Algorithms/inc/MantidAlgorithms/RemoveExpDecay.h
index 440d0f526d7..1a7f5fef0e7 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/RemoveExpDecay.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/RemoveExpDecay.h
@@ -4,8 +4,8 @@
 //----------------------------------------------------------------------
 // Includes
 //----------------------------------------------------------------------
-#include <vector>
 #include "MantidAPI/Algorithm.h"
+#include "MantidKernel/cow_ptr.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ResampleX.h b/Framework/Algorithms/inc/MantidAlgorithms/ResampleX.h
index a31ffee9b69..d2be84c1e92 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ResampleX.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ResampleX.h
@@ -5,6 +5,7 @@
 #include "MantidKernel/System.h"
 #include "MantidAlgorithms/Rebin.h"
 #include "MantidAPI/Algorithm.h"
+#include "MantidKernel/cow_ptr.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SmoothData.h b/Framework/Algorithms/inc/MantidAlgorithms/SmoothData.h
index 2156c73ef10..5598cab7b65 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SmoothData.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SmoothData.h
@@ -5,6 +5,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidGeometry/IDTypes.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SpatialGrouping.h b/Framework/Algorithms/inc/MantidAlgorithms/SpatialGrouping.h
index db8d17ed217..a7b9afc867d 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SpatialGrouping.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SpatialGrouping.h
@@ -5,6 +5,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidGeometry/IDTypes.h"
 
 namespace Mantid {
 namespace Kernel {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SphericalAbsorption.h b/Framework/Algorithms/inc/MantidAlgorithms/SphericalAbsorption.h
index 4d0b13b9e42..b2ea3ea4af9 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SphericalAbsorption.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SphericalAbsorption.h
@@ -5,8 +5,23 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidGeometry/IDetector.h"
 
 namespace Mantid {
+
+// forward declaration from other Mantid modules
+namespace API {
+class Sample;
+}
+
+namespace Kernel {
+class V3D;
+}
+
+namespace Geometry {
+class Object;
+}
+
 namespace Algorithms {
 /** A spherical absorption correction algorithm.
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Stitch1D.h b/Framework/Algorithms/inc/MantidAlgorithms/Stitch1D.h
index 8de73c49ccc..87d07ee3a97 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Stitch1D.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Stitch1D.h
@@ -1,8 +1,9 @@
 #ifndef MANTID_ALGORITHMS_STITCH1D_H_
 #define MANTID_ALGORITHMS_STITCH1D_H_
 
-#include "MantidKernel/System.h"
 #include "MantidAPI/Algorithm.h"
+#include "MantidKernel/cow_ptr.h"
+
 #include <boost/tuple/tuple.hpp>
 
 namespace Mantid {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Transpose.h b/Framework/Algorithms/inc/MantidAlgorithms/Transpose.h
index a7f4603dc99..95fa39f8878 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Transpose.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Transpose.h
@@ -7,6 +7,12 @@
 #include "MantidAPI/Algorithm.h"
 
 namespace Mantid {
+
+// forward declarations
+namespace API {
+class Axis;
+}
+
 namespace Algorithms {
 /**
 This algorithm "transposes" the bins of the input workspace into a single
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/UnwrapMonitor.h b/Framework/Algorithms/inc/MantidAlgorithms/UnwrapMonitor.h
index 52b58d95d16..3b4738fa23f 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/UnwrapMonitor.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/UnwrapMonitor.h
@@ -5,6 +5,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidKernel/cow_ptr.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/VesuvioL1ThetaResolution.h b/Framework/Algorithms/inc/MantidAlgorithms/VesuvioL1ThetaResolution.h
index ee9d1794018..6f7cb085eef 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/VesuvioL1ThetaResolution.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/VesuvioL1ThetaResolution.h
@@ -3,6 +3,8 @@
 
 #include "MantidKernel/System.h"
 #include "MantidAPI/Algorithm.h"
+#include "MantidGeometry/IDetector.h"
+#include "MantidGeometry/IComponent.h"
 
 #include <boost/random/mersenne_twister.hpp>
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/WienerSmooth.h b/Framework/Algorithms/inc/MantidAlgorithms/WienerSmooth.h
index 0a433dc3c68..cf3ff1288e1 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/WienerSmooth.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/WienerSmooth.h
@@ -1,8 +1,8 @@
 #ifndef MANTID_ALGORITHMS_WIENERSMOOTH_H_
 #define MANTID_ALGORITHMS_WIENERSMOOTH_H_
 
-#include "MantidKernel/System.h"
 #include "MantidAPI/Algorithm.h"
+#include "MantidKernel/cow_ptr.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/XDataConverter.h b/Framework/Algorithms/inc/MantidAlgorithms/XDataConverter.h
index 224e1e6138a..972b444fe42 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/XDataConverter.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/XDataConverter.h
@@ -5,6 +5,7 @@
 // Includes
 //------------------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidKernel/cow_ptr.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/src/AbsorptionCorrection.cpp b/Framework/Algorithms/src/AbsorptionCorrection.cpp
index 4b4b7773642..d07d5510231 100644
--- a/Framework/Algorithms/src/AbsorptionCorrection.cpp
+++ b/Framework/Algorithms/src/AbsorptionCorrection.cpp
@@ -4,11 +4,13 @@
 #include "MantidAlgorithms/AbsorptionCorrection.h"
 #include "MantidAPI/InstrumentValidator.h"
 #include "MantidAPI/WorkspaceUnitValidator.h"
+#include "MantidGeometry/IDetector.h"
 #include "MantidGeometry/Objects/ShapeFactory.h"
 #include "MantidKernel/BoundedValidator.h"
 #include "MantidKernel/CompositeValidator.h"
 #include "MantidKernel/Fast_Exponential.h"
 #include "MantidKernel/ListValidator.h"
+#include "MantidKernel/Unit.h"
 #include "MantidKernel/UnitFactory.h"
 #include "MantidKernel/VectorHelper.h"
 
diff --git a/Framework/Algorithms/src/AddNote.cpp b/Framework/Algorithms/src/AddNote.cpp
index 0f045b233da..c11fc223595 100644
--- a/Framework/Algorithms/src/AddNote.cpp
+++ b/Framework/Algorithms/src/AddNote.cpp
@@ -1,4 +1,5 @@
 #include "MantidAlgorithms/AddNote.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/DateTimeValidator.h"
 #include "MantidKernel/MandatoryValidator.h"
 #include "MantidKernel/TimeSeriesProperty.h"
diff --git a/Framework/Algorithms/src/AddPeak.cpp b/Framework/Algorithms/src/AddPeak.cpp
index c525e93bbc0..edba5b2927d 100644
--- a/Framework/Algorithms/src/AddPeak.cpp
+++ b/Framework/Algorithms/src/AddPeak.cpp
@@ -1,8 +1,11 @@
 #include "MantidAlgorithms/AddPeak.h"
-#include "MantidKernel/System.h"
+
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/IPeaksWorkspace.h"
-#include "MantidGeometry/Crystal/IPeak.h"
 #include "MantidAPI/MatrixWorkspace.h"
+#include "MantidGeometry/Crystal/IPeak.h"
+#include "MantidKernel/Unit.h"
+#include "MantidKernel/System.h"
 
 using namespace Mantid::PhysicalConstants;
 
diff --git a/Framework/Algorithms/src/AddSampleLog.cpp b/Framework/Algorithms/src/AddSampleLog.cpp
index a647724c7b8..12d74dd3e0a 100644
--- a/Framework/Algorithms/src/AddSampleLog.cpp
+++ b/Framework/Algorithms/src/AddSampleLog.cpp
@@ -2,12 +2,15 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/AddSampleLog.h"
+#include "MantidAPI/ExperimentInfo.h"
+#include "MantidAPI/Run.h"
 #include "MantidKernel/Exception.h"
 #include "MantidKernel/ListValidator.h"
 #include "MantidKernel/MandatoryValidator.h"
 #include "MantidKernel/Strings.h"
 #include "MantidKernel/TimeSeriesProperty.h"
 #include "MantidKernel/PropertyWithValue.h"
+
 #include <string>
 
 namespace {
diff --git a/Framework/Algorithms/src/AddTimeSeriesLog.cpp b/Framework/Algorithms/src/AddTimeSeriesLog.cpp
index 1d163d466fd..4a1d79de9b7 100644
--- a/Framework/Algorithms/src/AddTimeSeriesLog.cpp
+++ b/Framework/Algorithms/src/AddTimeSeriesLog.cpp
@@ -1,4 +1,6 @@
 #include "MantidAlgorithms/AddTimeSeriesLog.h"
+#include "MantidAPI/MatrixWorkspace.h"
+#include "MantidAPI/Run.h"
 #include "MantidKernel/DateTimeValidator.h"
 #include "MantidKernel/MandatoryValidator.h"
 #include "MantidKernel/ListValidator.h"
diff --git a/Framework/Algorithms/src/AlignDetectors.cpp b/Framework/Algorithms/src/AlignDetectors.cpp
index ac2b0d919df..19ba1c020d2 100644
--- a/Framework/Algorithms/src/AlignDetectors.cpp
+++ b/Framework/Algorithms/src/AlignDetectors.cpp
@@ -2,6 +2,8 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/AlignDetectors.h"
+
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/FileProperty.h"
 #include "MantidAPI/ITableWorkspace.h"
 #include "MantidAPI/RawCountValidator.h"
@@ -10,8 +12,9 @@
 #include "MantidDataObjects/OffsetsWorkspace.h"
 #include "MantidKernel/CompositeValidator.h"
 #include "MantidKernel/PhysicalConstants.h"
-#include "MantidKernel/V3D.h"
 #include "MantidKernel/UnitFactory.h"
+#include "MantidKernel/V3D.h"
+
 #include <fstream>
 #include <sstream>
 
diff --git a/Framework/Algorithms/src/AlphaCalc.cpp b/Framework/Algorithms/src/AlphaCalc.cpp
index 68c97b0985d..c259e8db6b4 100644
--- a/Framework/Algorithms/src/AlphaCalc.cpp
+++ b/Framework/Algorithms/src/AlphaCalc.cpp
@@ -1,12 +1,13 @@
 //----------------------------------------------------------------------
 // Includes
 //----------------------------------------------------------------------
+#include "MantidAlgorithms/AlphaCalc.h"
+#include "MantidAPI/MatrixWorkspace.h"
+#include "MantidKernel/ArrayProperty.h"
+
 #include <cmath>
 #include <vector>
 
-#include "MantidKernel/ArrayProperty.h"
-#include "MantidAlgorithms/AlphaCalc.h"
-
 namespace Mantid {
 namespace Algorithms {
 
diff --git a/Framework/Algorithms/src/AnyShapeAbsorption.cpp b/Framework/Algorithms/src/AnyShapeAbsorption.cpp
index 47b65c01b43..28537bc1a93 100644
--- a/Framework/Algorithms/src/AnyShapeAbsorption.cpp
+++ b/Framework/Algorithms/src/AnyShapeAbsorption.cpp
@@ -2,6 +2,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/AnyShapeAbsorption.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidGeometry/Objects/ShapeFactory.h"
 #include "MantidKernel/BoundedValidator.h"
 
diff --git a/Framework/Algorithms/src/ApplyDeadTimeCorr.cpp b/Framework/Algorithms/src/ApplyDeadTimeCorr.cpp
index e50710997d9..870d445b62c 100644
--- a/Framework/Algorithms/src/ApplyDeadTimeCorr.cpp
+++ b/Framework/Algorithms/src/ApplyDeadTimeCorr.cpp
@@ -2,12 +2,14 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/ApplyDeadTimeCorr.h"
+#include "MantidAPI/ITableWorkspace.h"
+#include "MantidAPI/MatrixWorkspace.h"
+#include "MantidAPI/TableRow.h"
+#include "MantidKernel/PropertyWithValue.h"
 #include "MantidKernel/System.h"
 #include "MantidKernel/TimeSeriesProperty.h"
-#include "MantidKernel/PropertyWithValue.h"
+
 #include "boost/lexical_cast.hpp"
-#include "MantidAPI/ITableWorkspace.h"
-#include "MantidAPI/TableRow.h"
 
 #include <cmath>
 
diff --git a/Framework/Algorithms/src/AsymmetryCalc.cpp b/Framework/Algorithms/src/AsymmetryCalc.cpp
index ebe15328c4e..9f43bcc9779 100644
--- a/Framework/Algorithms/src/AsymmetryCalc.cpp
+++ b/Framework/Algorithms/src/AsymmetryCalc.cpp
@@ -1,11 +1,12 @@
 //----------------------------------------------------------------------
 // Includes
 //----------------------------------------------------------------------
-#include <cmath>
-#include <vector>
-
 #include "MantidKernel/ArrayProperty.h"
 #include "MantidAlgorithms/AsymmetryCalc.h"
+#include "MantidAPI/MatrixWorkspace.h"
+
+#include <cmath>
+#include <vector>
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/src/AverageLogData.cpp b/Framework/Algorithms/src/AverageLogData.cpp
index 4c6eb7706fe..b85f201a3bd 100644
--- a/Framework/Algorithms/src/AverageLogData.cpp
+++ b/Framework/Algorithms/src/AverageLogData.cpp
@@ -1,7 +1,10 @@
 #include "MantidAlgorithms/AverageLogData.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/TimeSeriesProperty.h"
+
 using namespace Mantid::Kernel;
 using namespace Mantid::API;
+
 namespace Mantid {
 namespace Algorithms {
 
diff --git a/Framework/Algorithms/src/BinaryOperation.cpp b/Framework/Algorithms/src/BinaryOperation.cpp
index 826df55543a..fcb1f052d47 100644
--- a/Framework/Algorithms/src/BinaryOperation.cpp
+++ b/Framework/Algorithms/src/BinaryOperation.cpp
@@ -2,15 +2,16 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/BinaryOperation.h"
-#include "MantidDataObjects/EventWorkspace.h"
-#include "MantidDataObjects/EventList.h"
 #include "MantidAPI/FrameworkManager.h"
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/MemoryManager.h"
 #include "MantidAPI/WorkspaceProperty.h"
 #include "MantidAPI/WorkspaceOpOverloads.h"
+#include "MantidDataObjects/EventWorkspace.h"
+#include "MantidDataObjects/EventList.h"
+#include "MantidDataObjects/WorkspaceSingleValue.h"
 #include "MantidGeometry/IDetector.h"
 #include "MantidKernel/Timer.h"
-#include "MantidDataObjects/WorkspaceSingleValue.h"
 
 #include <boost/make_shared.hpp>
 
diff --git a/Framework/Algorithms/src/CalMuonDeadTime.cpp b/Framework/Algorithms/src/CalMuonDeadTime.cpp
index 1bf8672469d..a60d964df03 100644
--- a/Framework/Algorithms/src/CalMuonDeadTime.cpp
+++ b/Framework/Algorithms/src/CalMuonDeadTime.cpp
@@ -1,14 +1,15 @@
 //----------------------------------------------------------------------
 // Includes
 //----------------------------------------------------------------------
-#include <cmath>
-#include <vector>
-
 #include "MantidKernel/ArrayProperty.h"
 #include "MantidAlgorithms/CalMuonDeadTime.h"
 #include "MantidAPI/TableRow.h"
 #include "MantidAPI/ITableWorkspace.h"
 #include "MantidAPI/IFunction.h"
+#include "MantidAPI/MatrixWorkspace.h"
+
+#include <cmath>
+#include <vector>
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/src/CalMuonDetectorPhases.cpp b/Framework/Algorithms/src/CalMuonDetectorPhases.cpp
index abe86d24731..edebc59b922 100644
--- a/Framework/Algorithms/src/CalMuonDetectorPhases.cpp
+++ b/Framework/Algorithms/src/CalMuonDetectorPhases.cpp
@@ -1,8 +1,10 @@
 #include "MantidAlgorithms/CalMuonDetectorPhases.h"
 
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/FunctionFactory.h"
 #include "MantidAPI/ITableWorkspace.h"
 #include "MantidAPI/IFunction.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidAPI/MultiDomainFunction.h"
 #include "MantidAPI/TableRow.h"
 
diff --git a/Framework/Algorithms/src/CalculateSlits.cpp b/Framework/Algorithms/src/CalculateSlits.cpp
index d32db847110..8d0b3f20918 100644
--- a/Framework/Algorithms/src/CalculateSlits.cpp
+++ b/Framework/Algorithms/src/CalculateSlits.cpp
@@ -7,7 +7,6 @@ namespace Mantid {
 namespace Algorithms {
 
 using namespace Mantid::API;
-using namespace Mantid::Geometry;
 using namespace Mantid::Kernel;
 
 // Register the algorithm into the AlgorithmFactory
diff --git a/Framework/Algorithms/src/ChangeBinOffset.cpp b/Framework/Algorithms/src/ChangeBinOffset.cpp
index 4b27f8138e7..2fb427b73b6 100644
--- a/Framework/Algorithms/src/ChangeBinOffset.cpp
+++ b/Framework/Algorithms/src/ChangeBinOffset.cpp
@@ -2,6 +2,8 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/ChangeBinOffset.h"
+#include "MantidAPI/Axis.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidKernel/BoundedValidator.h"
 
diff --git a/Framework/Algorithms/src/ClearInstrumentParameters.cpp b/Framework/Algorithms/src/ClearInstrumentParameters.cpp
index e82b0d117d4..432c413181b 100644
--- a/Framework/Algorithms/src/ClearInstrumentParameters.cpp
+++ b/Framework/Algorithms/src/ClearInstrumentParameters.cpp
@@ -1,6 +1,7 @@
 #include "MantidAlgorithms/ClearInstrumentParameters.h"
 #include "MantidAPI/FileProperty.h"
 #include "MantidAPI/InstrumentValidator.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidGeometry/IComponent.h"
 #include "MantidGeometry/Instrument.h"
 #include "MantidGeometry/Instrument/ParameterMap.h"
diff --git a/Framework/Algorithms/src/ClearMaskFlag.cpp b/Framework/Algorithms/src/ClearMaskFlag.cpp
index bf5db63795b..e1b96f7004b 100644
--- a/Framework/Algorithms/src/ClearMaskFlag.cpp
+++ b/Framework/Algorithms/src/ClearMaskFlag.cpp
@@ -1,5 +1,8 @@
 #include "MantidAlgorithms/ClearMaskFlag.h"
 
+#include "MantidAPI/MatrixWorkspace.h"
+#include "MantidGeometry/Instrument/ParameterMap.h"
+
 namespace Mantid {
 namespace Algorithms {
 
diff --git a/Framework/Algorithms/src/ConvertEmptyToTof.cpp b/Framework/Algorithms/src/ConvertEmptyToTof.cpp
index 4cc66b7af20..d61c531a384 100644
--- a/Framework/Algorithms/src/ConvertEmptyToTof.cpp
+++ b/Framework/Algorithms/src/ConvertEmptyToTof.cpp
@@ -3,6 +3,7 @@
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/ConvertEmptyToTof.h"
 
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/ConstraintFactory.h"
 #include "MantidAPI/FunctionFactory.h"
 #include "MantidAPI/IPeakFunction.h"
diff --git a/Framework/Algorithms/src/ConvertTableToMatrixWorkspace.cpp b/Framework/Algorithms/src/ConvertTableToMatrixWorkspace.cpp
index 3a3ead4cfe5..ea7855caf5d 100644
--- a/Framework/Algorithms/src/ConvertTableToMatrixWorkspace.cpp
+++ b/Framework/Algorithms/src/ConvertTableToMatrixWorkspace.cpp
@@ -2,13 +2,16 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/ConvertTableToMatrixWorkspace.h"
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/ITableWorkspace.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/UnitFactory.h"
 #include "MantidKernel/Unit.h"
 #include "MantidKernel/MandatoryValidator.h"
 
 #include <boost/mpl/if.hpp>
 #include <boost/type_traits.hpp>
+
 #include <sstream>
 
 namespace Mantid {
diff --git a/Framework/Algorithms/src/ConvertToHistogram.cpp b/Framework/Algorithms/src/ConvertToHistogram.cpp
index d72f63685ba..526ec172fc9 100644
--- a/Framework/Algorithms/src/ConvertToHistogram.cpp
+++ b/Framework/Algorithms/src/ConvertToHistogram.cpp
@@ -2,6 +2,7 @@
 // Includes
 //------------------------------------------------------------------------------
 #include "MantidAlgorithms/ConvertToHistogram.h"
+#include "MantidAPI/MatrixWorkspace.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/src/ConvertToPointData.cpp b/Framework/Algorithms/src/ConvertToPointData.cpp
index 739ca37a910..d49ef895e00 100644
--- a/Framework/Algorithms/src/ConvertToPointData.cpp
+++ b/Framework/Algorithms/src/ConvertToPointData.cpp
@@ -2,6 +2,7 @@
 // Includes
 //------------------------------------------------------------------------------
 #include "MantidAlgorithms/ConvertToPointData.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/VectorHelper.h"
 
 namespace Mantid {
diff --git a/Framework/Algorithms/src/ConvertUnits.cpp b/Framework/Algorithms/src/ConvertUnits.cpp
index 7d723aad5d0..c1cbe22542e 100644
--- a/Framework/Algorithms/src/ConvertUnits.cpp
+++ b/Framework/Algorithms/src/ConvertUnits.cpp
@@ -3,6 +3,7 @@
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/ConvertUnits.h"
 #include "MantidAPI/AlgorithmFactory.h"
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/CommonBinsValidator.h"
 #include "MantidAPI/HistogramValidator.h"
 #include "MantidAPI/Run.h"
diff --git a/Framework/Algorithms/src/ConvertUnitsUsingDetectorTable.cpp b/Framework/Algorithms/src/ConvertUnitsUsingDetectorTable.cpp
index 7d4f6bcbe1f..8ff9af4ffdb 100644
--- a/Framework/Algorithms/src/ConvertUnitsUsingDetectorTable.cpp
+++ b/Framework/Algorithms/src/ConvertUnitsUsingDetectorTable.cpp
@@ -1,5 +1,6 @@
 #include "MantidAlgorithms/ConvertUnitsUsingDetectorTable.h"
 
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/CommonBinsValidator.h"
 #include "MantidAPI/ITableWorkspace.h"
 #include "MantidAPI/Run.h"
@@ -10,6 +11,7 @@
 #include "MantidDataObjects/Workspace2D.h"
 #include "MantidKernel/BoundedValidator.h"
 #include "MantidKernel/ListValidator.h"
+#include "MantidKernel/Unit.h"
 #include "MantidKernel/UnitFactory.h"
 
 #include <boost/bind.hpp>
diff --git a/Framework/Algorithms/src/CopyDetectorMapping.cpp b/Framework/Algorithms/src/CopyDetectorMapping.cpp
index 2696e9ff508..609319a00e4 100644
--- a/Framework/Algorithms/src/CopyDetectorMapping.cpp
+++ b/Framework/Algorithms/src/CopyDetectorMapping.cpp
@@ -2,6 +2,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/CopyDetectorMapping.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidAPI/SpectrumDetectorMapping.h"
 
 namespace Mantid {
diff --git a/Framework/Algorithms/src/CopyInstrumentParameters.cpp b/Framework/Algorithms/src/CopyInstrumentParameters.cpp
index e265674d7d3..cb7a8612607 100644
--- a/Framework/Algorithms/src/CopyInstrumentParameters.cpp
+++ b/Framework/Algorithms/src/CopyInstrumentParameters.cpp
@@ -2,6 +2,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/CopyInstrumentParameters.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidGeometry/Instrument/ParameterMap.h"
 
 #include <iostream>
diff --git a/Framework/Algorithms/src/CopyLogs.cpp b/Framework/Algorithms/src/CopyLogs.cpp
index 6893f3d6f6e..50a9caab1f6 100644
--- a/Framework/Algorithms/src/CopyLogs.cpp
+++ b/Framework/Algorithms/src/CopyLogs.cpp
@@ -1,4 +1,7 @@
 #include "MantidAlgorithms/CopyLogs.h"
+
+#include "MantidAPI/Run.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/ListValidator.h"
 #include "MantidKernel/Property.h"
 
diff --git a/Framework/Algorithms/src/CorrectToFile.cpp b/Framework/Algorithms/src/CorrectToFile.cpp
index 8c7bea7a240..6d53b24c20c 100644
--- a/Framework/Algorithms/src/CorrectToFile.cpp
+++ b/Framework/Algorithms/src/CorrectToFile.cpp
@@ -2,7 +2,9 @@
 // Includes
 //----------------------------
 #include "MantidAlgorithms/CorrectToFile.h"
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/FileProperty.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/ListValidator.h"
 #include "MantidKernel/UnitFactory.h"
 
diff --git a/Framework/Algorithms/src/CreateLogPropertyTable.cpp b/Framework/Algorithms/src/CreateLogPropertyTable.cpp
index 249b1236c03..fe9f8401690 100644
--- a/Framework/Algorithms/src/CreateLogPropertyTable.cpp
+++ b/Framework/Algorithms/src/CreateLogPropertyTable.cpp
@@ -2,19 +2,22 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/CreateLogPropertyTable.h"
+
+#include "MantidAPI/ITableWorkspace.h"
+#include "MantidAPI/TableRow.h"
+#include "MantidAPI/MatrixWorkspace.h"
+#include "MantidAPI/Run.h"
+#include "MantidAPI/WorkspaceFactory.h"
 #include "MantidKernel/ArrayProperty.h"
+#include "MantidKernel/ListValidator.h"
 #include "MantidKernel/MandatoryValidator.h"
 #include "MantidKernel/VisibleWhenProperty.h"
-#include "MantidKernel/ListValidator.h"
-#include "MantidAPI/WorkspaceFactory.h"
-#include "MantidAPI/ITableWorkspace.h"
-#include "MantidAPI/TableRow.h"
 
 #include "boost/shared_ptr.hpp"
 
-#include <vector>
-#include <map>
 #include <assert.h>
+#include <map>
+#include <vector>
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/src/CreateLogTimeCorrection.cpp b/Framework/Algorithms/src/CreateLogTimeCorrection.cpp
index f82a8c43d5f..75833eafb6e 100644
--- a/Framework/Algorithms/src/CreateLogTimeCorrection.cpp
+++ b/Framework/Algorithms/src/CreateLogTimeCorrection.cpp
@@ -1,8 +1,10 @@
 #include "MantidAlgorithms/CreateLogTimeCorrection.h"
-#include "MantidAPI/WorkspaceProperty.h"
 #include "MantidAPI/FileProperty.h"
-#include "MantidAPI/TableRow.h"
 #include "MantidAPI/InstrumentValidator.h"
+#include "MantidAPI/MatrixWorkspace.h"
+#include "MantidAPI/Run.h"
+#include "MantidAPI/TableRow.h"
+#include "MantidAPI/WorkspaceProperty.h"
 
 #include <fstream>
 
diff --git a/Framework/Algorithms/src/CreateSampleWorkspace.cpp b/Framework/Algorithms/src/CreateSampleWorkspace.cpp
index 2afebbf0689..9a1e416401f 100644
--- a/Framework/Algorithms/src/CreateSampleWorkspace.cpp
+++ b/Framework/Algorithms/src/CreateSampleWorkspace.cpp
@@ -1,7 +1,10 @@
 #include "MantidAlgorithms/CreateSampleWorkspace.h"
+#include "MantidAPI/Axis.h"
+#include "MantidAPI/FunctionFactory.h"
+#include "MantidAPI/FunctionDomain1D.h"
+#include "MantidAPI/FunctionProperty.h"
 #include "MantidDataObjects/Workspace2D.h"
 #include "MantidDataObjects/EventWorkspace.h"
-#include "MantidAPI/FunctionProperty.h"
 #include "MantidGeometry/Objects/ShapeFactory.h"
 #include "MantidGeometry/Instrument/ReferenceFrame.h"
 #include "MantidGeometry/Instrument/RectangularDetector.h"
@@ -9,8 +12,7 @@
 #include "MantidKernel/ListValidator.h"
 #include "MantidKernel/UnitFactory.h"
 #include "MantidKernel/MersenneTwister.h"
-#include "MantidAPI/FunctionFactory.h"
-#include "MantidAPI/FunctionDomain1D.h"
+
 #include <cmath>
 #include <ctime>
 #include <numeric>
diff --git a/Framework/Algorithms/src/CreateWorkspace.cpp b/Framework/Algorithms/src/CreateWorkspace.cpp
index 2d901349fb0..610427005cd 100644
--- a/Framework/Algorithms/src/CreateWorkspace.cpp
+++ b/Framework/Algorithms/src/CreateWorkspace.cpp
@@ -4,6 +4,7 @@
 #include "MantidKernel/PropertyWithValue.h"
 #include "MantidKernel/UnitFactory.h"
 #include "MantidAPI/BinEdgeAxis.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidAPI/NumericAxis.h"
 #include "MantidAPI/SpectraAxis.h"
 #include "MantidAPI/TextAxis.h"
diff --git a/Framework/Algorithms/src/CropWorkspace.cpp b/Framework/Algorithms/src/CropWorkspace.cpp
index 727af9824ba..2e144764839 100644
--- a/Framework/Algorithms/src/CropWorkspace.cpp
+++ b/Framework/Algorithms/src/CropWorkspace.cpp
@@ -1,6 +1,7 @@
 //----------------------------------------------------------------------
 // Includes
 //----------------------------------------------------------------------
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidAlgorithms/CropWorkspace.h"
 #include "MantidKernel/BoundedValidator.h"
 
diff --git a/Framework/Algorithms/src/CylinderAbsorption.cpp b/Framework/Algorithms/src/CylinderAbsorption.cpp
index 9da1b9af1bd..ddfe66983e5 100644
--- a/Framework/Algorithms/src/CylinderAbsorption.cpp
+++ b/Framework/Algorithms/src/CylinderAbsorption.cpp
@@ -2,6 +2,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/CylinderAbsorption.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/BoundedValidator.h"
 
 namespace Mantid {
diff --git a/Framework/Algorithms/src/DeleteLog.cpp b/Framework/Algorithms/src/DeleteLog.cpp
index 319aa8c1d25..34152eebbe4 100644
--- a/Framework/Algorithms/src/DeleteLog.cpp
+++ b/Framework/Algorithms/src/DeleteLog.cpp
@@ -1,4 +1,5 @@
 #include "MantidAlgorithms/DeleteLog.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/MandatoryValidator.h"
 
 namespace Mantid {
diff --git a/Framework/Algorithms/src/DetectorEfficiencyCor.cpp b/Framework/Algorithms/src/DetectorEfficiencyCor.cpp
index d10da8c5fb7..e19c0c71160 100644
--- a/Framework/Algorithms/src/DetectorEfficiencyCor.cpp
+++ b/Framework/Algorithms/src/DetectorEfficiencyCor.cpp
@@ -1,4 +1,5 @@
 #include "MantidAlgorithms/DetectorEfficiencyCor.h"
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/HistogramValidator.h"
 #include "MantidAPI/InstrumentValidator.h"
 #include "MantidAPI/WorkspaceUnitValidator.h"
diff --git a/Framework/Algorithms/src/DiffractionFocussing.cpp b/Framework/Algorithms/src/DiffractionFocussing.cpp
index 1a342155ce1..61cf0f85615 100644
--- a/Framework/Algorithms/src/DiffractionFocussing.cpp
+++ b/Framework/Algorithms/src/DiffractionFocussing.cpp
@@ -2,11 +2,14 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/DiffractionFocussing.h"
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/FileProperty.h"
+#include "MantidAPI/MatrixWorkspace.h"
+#include "MantidKernel/Unit.h"
 
+#include <fstream>
 #include <limits>
 #include <map>
-#include <fstream>
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/src/DiffractionFocussing2.cpp b/Framework/Algorithms/src/DiffractionFocussing2.cpp
index ef0a64ca636..896306807b8 100644
--- a/Framework/Algorithms/src/DiffractionFocussing2.cpp
+++ b/Framework/Algorithms/src/DiffractionFocussing2.cpp
@@ -5,6 +5,7 @@
 #include "MantidAPI/Axis.h"
 #include "MantidAPI/FileProperty.h"
 #include "MantidAPI/MemoryManager.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidAPI/ISpectrum.h"
 #include "MantidAPI/RawCountValidator.h"
 #include "MantidAPI/SpectraAxis.h"
diff --git a/Framework/Algorithms/src/EditInstrumentGeometry.cpp b/Framework/Algorithms/src/EditInstrumentGeometry.cpp
index 61beea3febd..f1afbef6765 100644
--- a/Framework/Algorithms/src/EditInstrumentGeometry.cpp
+++ b/Framework/Algorithms/src/EditInstrumentGeometry.cpp
@@ -1,6 +1,7 @@
 #include "MantidAlgorithms/EditInstrumentGeometry.h"
 #include "MantidGeometry/Instrument/Detector.h"
 #include "MantidAPI/ISpectrum.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/ArrayProperty.h"
 #include "MantidKernel/MandatoryValidator.h"
 
diff --git a/Framework/Algorithms/src/ElasticWindow.cpp b/Framework/Algorithms/src/ElasticWindow.cpp
index 3496acff080..1ca7f5c19cc 100644
--- a/Framework/Algorithms/src/ElasticWindow.cpp
+++ b/Framework/Algorithms/src/ElasticWindow.cpp
@@ -2,6 +2,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/ElasticWindow.h"
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/WorkspaceUnitValidator.h"
 #include "MantidKernel/BoundedValidator.h"
 #include "MantidKernel/MandatoryValidator.h"
diff --git a/Framework/Algorithms/src/EstimateResolutionDiffraction.cpp b/Framework/Algorithms/src/EstimateResolutionDiffraction.cpp
index 2c39dfdf1fd..1d1108ede7c 100644
--- a/Framework/Algorithms/src/EstimateResolutionDiffraction.cpp
+++ b/Framework/Algorithms/src/EstimateResolutionDiffraction.cpp
@@ -2,9 +2,10 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/EstimateResolutionDiffraction.h"
+#include "MantidAPI/MatrixWorkspace.h"
+#include "MantidAPI/WorkspaceProperty.h"
 #include "MantidGeometry/IDetector.h"
 #include "MantidGeometry/Instrument/Detector.h"
-#include "MantidAPI/WorkspaceProperty.h"
 #include "MantidKernel/BoundedValidator.h"
 #include "MantidKernel/PhysicalConstants.h"
 #include "MantidKernel/TimeSeriesProperty.h"
diff --git a/Framework/Algorithms/src/ExportTimeSeriesLog.cpp b/Framework/Algorithms/src/ExportTimeSeriesLog.cpp
index a482be8b416..da7abd45471 100644
--- a/Framework/Algorithms/src/ExportTimeSeriesLog.cpp
+++ b/Framework/Algorithms/src/ExportTimeSeriesLog.cpp
@@ -1,5 +1,6 @@
 #include "MantidAlgorithms/ExportTimeSeriesLog.h"
 #include "MantidKernel/System.h"
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/FileProperty.h"
 #include "MantidAPI/WorkspaceProperty.h"
 #include "MantidAPI/IEventList.h"
diff --git a/Framework/Algorithms/src/ExtractFFTSpectrum.cpp b/Framework/Algorithms/src/ExtractFFTSpectrum.cpp
index a8fc047373c..9c452935f91 100644
--- a/Framework/Algorithms/src/ExtractFFTSpectrum.cpp
+++ b/Framework/Algorithms/src/ExtractFFTSpectrum.cpp
@@ -2,7 +2,10 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/ExtractFFTSpectrum.h"
+#include "MantidAPI/Axis.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/MultiThreaded.h"
+#include "MantidKernel/Unit.h"
 #include "MantidKernel/UnitFactory.h"
 #include "MantidKernel/BoundedValidator.h"
 
diff --git a/Framework/Algorithms/src/ExtractSingleSpectrum.cpp b/Framework/Algorithms/src/ExtractSingleSpectrum.cpp
index 98bc38475a8..cf0a4e0b89f 100644
--- a/Framework/Algorithms/src/ExtractSingleSpectrum.cpp
+++ b/Framework/Algorithms/src/ExtractSingleSpectrum.cpp
@@ -2,6 +2,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/ExtractSingleSpectrum.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidAPI/TextAxis.h"
 #include "MantidKernel/BoundedValidator.h"
 
diff --git a/Framework/Algorithms/src/FFT.cpp b/Framework/Algorithms/src/FFT.cpp
index 78df545c301..40ee6fd6b9a 100644
--- a/Framework/Algorithms/src/FFT.cpp
+++ b/Framework/Algorithms/src/FFT.cpp
@@ -2,9 +2,10 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/FFT.h"
+#include "MantidAPI/MatrixWorkspace.h"
+#include "MantidAPI/TextAxis.h"
 #include "MantidKernel/UnitFactory.h"
 #include "MantidKernel/UnitLabelTypes.h"
-#include "MantidAPI/TextAxis.h"
 
 #include <boost/shared_array.hpp>
 #include <gsl/gsl_errno.h>
diff --git a/Framework/Algorithms/src/FFTDerivative.cpp b/Framework/Algorithms/src/FFTDerivative.cpp
index 699dff91646..f90ce8123a7 100644
--- a/Framework/Algorithms/src/FFTDerivative.cpp
+++ b/Framework/Algorithms/src/FFTDerivative.cpp
@@ -1,8 +1,9 @@
 #include "MantidAlgorithms/FFTDerivative.h"
+#include "MantidAPI/MatrixWorkspace.h"
+#include "MantidKernel/BoundedValidator.h"
 
 #include <algorithm>
 #include <functional>
-#include "MantidKernel/BoundedValidator.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/src/FFTSmooth.cpp b/Framework/Algorithms/src/FFTSmooth.cpp
index 4afd41392b7..a464557e589 100644
--- a/Framework/Algorithms/src/FFTSmooth.cpp
+++ b/Framework/Algorithms/src/FFTSmooth.cpp
@@ -2,6 +2,8 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/FFTSmooth.h"
+#include "MantidAPI/MatrixWorkspace.h"
+#include "MantidAPI/TextAxis.h"
 #include "MantidKernel/Exception.h"
 
 #include "MantidKernel/BoundedValidator.h"
diff --git a/Framework/Algorithms/src/FFTSmooth2.cpp b/Framework/Algorithms/src/FFTSmooth2.cpp
index 94dfda67be4..5c393fc47de 100644
--- a/Framework/Algorithms/src/FFTSmooth2.cpp
+++ b/Framework/Algorithms/src/FFTSmooth2.cpp
@@ -2,13 +2,15 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/FFTSmooth2.h"
+#include "MantidAPI/MatrixWorkspace.h"
+#include "MantidAPI/TextAxis.h"
+#include "MantidKernel/BoundedValidator.h"
 #include "MantidKernel/Exception.h"
+#include "MantidKernel/ListValidator.h"
+
 #include <boost/algorithm/string/split.hpp>
 #include <boost/algorithm/string/detail/classification.hpp>
 
-#include "MantidKernel/BoundedValidator.h"
-#include "MantidKernel/ListValidator.h"
-
 namespace Mantid {
 namespace Algorithms {
 
diff --git a/Framework/Algorithms/src/FindDeadDetectors.cpp b/Framework/Algorithms/src/FindDeadDetectors.cpp
index 774097f616b..5fb2ce0e288 100644
--- a/Framework/Algorithms/src/FindDeadDetectors.cpp
+++ b/Framework/Algorithms/src/FindDeadDetectors.cpp
@@ -2,10 +2,11 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/FindDeadDetectors.h"
-#include "MantidKernel/System.h"
-#include <fstream>
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/BoundedValidator.h"
 
+#include <fstream>
+
 namespace Mantid {
 namespace Algorithms {
 
diff --git a/Framework/Algorithms/src/FlatPlateAbsorption.cpp b/Framework/Algorithms/src/FlatPlateAbsorption.cpp
index bd7af3b3628..bb8c2f87f08 100644
--- a/Framework/Algorithms/src/FlatPlateAbsorption.cpp
+++ b/Framework/Algorithms/src/FlatPlateAbsorption.cpp
@@ -2,6 +2,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/FlatPlateAbsorption.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/BoundedValidator.h"
 
 namespace Mantid {
diff --git a/Framework/Algorithms/src/GeneralisedSecondDifference.cpp b/Framework/Algorithms/src/GeneralisedSecondDifference.cpp
index bef9de49bee..67615fb96bd 100644
--- a/Framework/Algorithms/src/GeneralisedSecondDifference.cpp
+++ b/Framework/Algorithms/src/GeneralisedSecondDifference.cpp
@@ -1,12 +1,14 @@
 //----------------------------------------------------------------------
 // Includes
 //----------------------------------------------------------------------
-#include <sstream>
-#include <numeric>
-#include "MantidKernel/VectorHelper.h"
-
 #include "MantidAlgorithms/GeneralisedSecondDifference.h"
+
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/BoundedValidator.h"
+#include "MantidKernel/VectorHelper.h"
+
+#include <numeric>
+#include <sstream>
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/src/GetAllEi.cpp b/Framework/Algorithms/src/GetAllEi.cpp
index de3e1f7efcb..038ee07630a 100644
--- a/Framework/Algorithms/src/GetAllEi.cpp
+++ b/Framework/Algorithms/src/GetAllEi.cpp
@@ -1,18 +1,20 @@
 //----------------------------------------------------------------------
 // Includes
 //----------------------------------------------------------------------
-#include <boost/format.hpp>
-#include <boost/algorithm/string.hpp>
-#include <string>
-
 #include "MantidAlgorithms/GetAllEi.h"
+#include "MantidAPI/Axis.h"
+#include "MantidDataObjects/TableWorkspace.h"
 #include "MantidKernel/BoundedValidator.h"
 #include "MantidKernel/FilteredTimeSeriesProperty.h"
 #include "MantidKernel/EnabledWhenProperty.h"
 #include "MantidKernel/UnitFactory.h"
 #include "MantidKernel/Unit.h"
 #include "MantidKernel/VectorHelper.h"
-#include "MantidDataObjects/TableWorkspace.h"
+
+#include <boost/format.hpp>
+#include <boost/algorithm/string.hpp>
+
+#include <string>
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/src/HRPDSlabCanAbsorption.cpp b/Framework/Algorithms/src/HRPDSlabCanAbsorption.cpp
index 054830ee7e3..4ec31bdf40d 100644
--- a/Framework/Algorithms/src/HRPDSlabCanAbsorption.cpp
+++ b/Framework/Algorithms/src/HRPDSlabCanAbsorption.cpp
@@ -2,6 +2,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/HRPDSlabCanAbsorption.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/BoundedValidator.h"
 #include "MantidKernel/ListValidator.h"
 
diff --git a/Framework/Algorithms/src/He3TubeEfficiency.cpp b/Framework/Algorithms/src/He3TubeEfficiency.cpp
index 077a4e670d3..8df77187efb 100644
--- a/Framework/Algorithms/src/He3TubeEfficiency.cpp
+++ b/Framework/Algorithms/src/He3TubeEfficiency.cpp
@@ -1,9 +1,11 @@
 #include "MantidAlgorithms/He3TubeEfficiency.h"
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/HistogramValidator.h"
 #include "MantidAPI/InstrumentValidator.h"
 #include "MantidAPI/WorkspaceUnitValidator.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidDataObjects/Workspace2D.h"
+#include "MantidGeometry/Instrument/ParameterMap.h"
 #include "MantidKernel/ArrayBoundedValidator.h"
 #include "MantidKernel/ArrayProperty.h"
 #include "MantidKernel/CompositeValidator.h"
diff --git a/Framework/Algorithms/src/IQTransform.cpp b/Framework/Algorithms/src/IQTransform.cpp
index d0484e12012..391a91aa34a 100644
--- a/Framework/Algorithms/src/IQTransform.cpp
+++ b/Framework/Algorithms/src/IQTransform.cpp
@@ -2,13 +2,16 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/IQTransform.h"
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/IncreasingAxisValidator.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidAPI/RawCountValidator.h"
 #include "MantidAPI/WorkspaceUnitValidator.h"
 #include "MantidKernel/ArrayProperty.h"
 #include "MantidKernel/BoundedValidator.h"
 #include "MantidKernel/CompositeValidator.h"
 #include "MantidKernel/ListValidator.h"
+#include "MantidKernel/Unit.h"
 #include "MantidKernel/UnitFactory.h"
 #include "MantidKernel/VectorHelper.h"
 
diff --git a/Framework/Algorithms/src/InterpolatingRebin.cpp b/Framework/Algorithms/src/InterpolatingRebin.cpp
index 562bb465c7f..ebf8fc691ed 100644
--- a/Framework/Algorithms/src/InterpolatingRebin.cpp
+++ b/Framework/Algorithms/src/InterpolatingRebin.cpp
@@ -2,9 +2,12 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/InterpolatingRebin.h"
+#include "MantidAPI/Axis.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/ArrayProperty.h"
 #include "MantidKernel/RebinParamsValidator.h"
 #include "MantidKernel/VectorHelper.h"
+
 #include <gsl/gsl_errno.h>
 #include <gsl/gsl_interp.h>
 #include <gsl/gsl_spline.h>
diff --git a/Framework/Algorithms/src/MaskDetectorsIf.cpp b/Framework/Algorithms/src/MaskDetectorsIf.cpp
index b955b120688..ef6248b2340 100644
--- a/Framework/Algorithms/src/MaskDetectorsIf.cpp
+++ b/Framework/Algorithms/src/MaskDetectorsIf.cpp
@@ -3,6 +3,7 @@
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/MaskDetectorsIf.h"
 #include "MantidAPI/FileProperty.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/ListValidator.h"
 
 #include <fstream>
diff --git a/Framework/Algorithms/src/MaxEnt.cpp b/Framework/Algorithms/src/MaxEnt.cpp
index 964940fd276..d652345acce 100644
--- a/Framework/Algorithms/src/MaxEnt.cpp
+++ b/Framework/Algorithms/src/MaxEnt.cpp
@@ -1,5 +1,5 @@
 #include "MantidAlgorithms/MaxEnt.h"
-
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/BoundedValidator.h"
 
 #include <boost/shared_array.hpp>
diff --git a/Framework/Algorithms/src/MergeRuns.cpp b/Framework/Algorithms/src/MergeRuns.cpp
index 415c983b6ce..be723a72f74 100644
--- a/Framework/Algorithms/src/MergeRuns.cpp
+++ b/Framework/Algorithms/src/MergeRuns.cpp
@@ -1,9 +1,11 @@
 //----------------------------------------------------------------------
 // Includes
 //----------------------------------------------------------------------
+#include "MantidAlgorithms/MergeRuns.h"
+
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/AlgorithmManager.h"
 #include "MantidAPI/WorkspaceGroup.h"
-#include "MantidAlgorithms/MergeRuns.h"
 #include "MantidKernel/ArrayProperty.h"
 #include "MantidKernel/MandatoryValidator.h"
 
diff --git a/Framework/Algorithms/src/ModeratorTzero.cpp b/Framework/Algorithms/src/ModeratorTzero.cpp
index cedbfed123b..a4200065f18 100644
--- a/Framework/Algorithms/src/ModeratorTzero.cpp
+++ b/Framework/Algorithms/src/ModeratorTzero.cpp
@@ -2,6 +2,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/ModeratorTzero.h"
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/WorkspaceUnitValidator.h"
 #include "MantidDataObjects/EventList.h"
 #include "MantidDataObjects/EventWorkspace.h"
diff --git a/Framework/Algorithms/src/ModeratorTzeroLinear.cpp b/Framework/Algorithms/src/ModeratorTzeroLinear.cpp
index 64a33b43fe8..a445c435059 100644
--- a/Framework/Algorithms/src/ModeratorTzeroLinear.cpp
+++ b/Framework/Algorithms/src/ModeratorTzeroLinear.cpp
@@ -2,6 +2,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/ModeratorTzeroLinear.h"
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/WorkspaceUnitValidator.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidDataObjects/Workspace2D.h"
diff --git a/Framework/Algorithms/src/MonitorEfficiencyCorUser.cpp b/Framework/Algorithms/src/MonitorEfficiencyCorUser.cpp
index 5278427de9e..12cdb2e9845 100644
--- a/Framework/Algorithms/src/MonitorEfficiencyCorUser.cpp
+++ b/Framework/Algorithms/src/MonitorEfficiencyCorUser.cpp
@@ -1,5 +1,6 @@
 #include "MantidAlgorithms/MonitorEfficiencyCorUser.h"
 #include "MantidAPI/InstrumentValidator.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidGeometry/muParser_Silent.h"
 #include "MantidKernel/MultiThreaded.h"
 
diff --git a/Framework/Algorithms/src/MonteCarloAbsorption.cpp b/Framework/Algorithms/src/MonteCarloAbsorption.cpp
index 8412f4c2689..3185c6d6cb2 100644
--- a/Framework/Algorithms/src/MonteCarloAbsorption.cpp
+++ b/Framework/Algorithms/src/MonteCarloAbsorption.cpp
@@ -10,6 +10,7 @@
 #include "MantidGeometry/Objects/Track.h"
 #include "MantidKernel/BoundedValidator.h"
 #include "MantidKernel/CompositeValidator.h"
+#include "MantidKernel/Material.h"
 #include "MantidKernel/VectorHelper.h"
 
 #include <boost/random/uniform_int.hpp>
diff --git a/Framework/Algorithms/src/MultiplyRange.cpp b/Framework/Algorithms/src/MultiplyRange.cpp
index 679389a9332..40e6e8f967b 100644
--- a/Framework/Algorithms/src/MultiplyRange.cpp
+++ b/Framework/Algorithms/src/MultiplyRange.cpp
@@ -2,6 +2,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/MultiplyRange.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/BoundedValidator.h"
 
 namespace Mantid {
diff --git a/Framework/Algorithms/src/MuonGroupDetectors.cpp b/Framework/Algorithms/src/MuonGroupDetectors.cpp
index 9dce66628d9..167b761a6fd 100644
--- a/Framework/Algorithms/src/MuonGroupDetectors.cpp
+++ b/Framework/Algorithms/src/MuonGroupDetectors.cpp
@@ -1,4 +1,5 @@
 #include "MantidAlgorithms/MuonGroupDetectors.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidAPI/WorkspaceFactory.h"
 #include "MantidDataObjects/TableWorkspace.h"
 
diff --git a/Framework/Algorithms/src/PDDetermineCharacterizations.cpp b/Framework/Algorithms/src/PDDetermineCharacterizations.cpp
index 985344a1ab0..7347441ff8f 100644
--- a/Framework/Algorithms/src/PDDetermineCharacterizations.cpp
+++ b/Framework/Algorithms/src/PDDetermineCharacterizations.cpp
@@ -1,4 +1,5 @@
 #include "MantidAlgorithms/PDDetermineCharacterizations.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidAPI/PropertyManagerDataService.h"
 #include "MantidAPI/ITableWorkspace.h"
 #include "MantidKernel/ArrayProperty.h"
diff --git a/Framework/Algorithms/src/PDFFourierTransform.cpp b/Framework/Algorithms/src/PDFFourierTransform.cpp
index ff91ab5cf25..4854e2f7282 100644
--- a/Framework/Algorithms/src/PDFFourierTransform.cpp
+++ b/Framework/Algorithms/src/PDFFourierTransform.cpp
@@ -1,9 +1,11 @@
 #include "MantidAlgorithms/PDFFourierTransform.h"
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/WorkspaceUnitValidator.h"
 #include "MantidKernel/BoundedValidator.h"
 #include "MantidKernel/ListValidator.h"
 #include "MantidKernel/PhysicalConstants.h"
 #include "MantidKernel/UnitFactory.h"
+
 #include <sstream>
 #include <math.h>
 
diff --git a/Framework/Algorithms/src/PhaseQuadMuon.cpp b/Framework/Algorithms/src/PhaseQuadMuon.cpp
index c1efaafd4cf..dfa9de2b1be 100644
--- a/Framework/Algorithms/src/PhaseQuadMuon.cpp
+++ b/Framework/Algorithms/src/PhaseQuadMuon.cpp
@@ -2,10 +2,11 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/PhaseQuadMuon.h"
-#include "MantidAPI/WorkspaceFactory.h"
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/ITableWorkspace.h"
-#include "MantidKernel/PhysicalConstants.h"
+#include "MantidAPI/WorkspaceFactory.h"
 #include "MantidAPI/MatrixWorkspaceValidator.h"
+#include "MantidKernel/PhysicalConstants.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/src/PointByPointVCorrection.cpp b/Framework/Algorithms/src/PointByPointVCorrection.cpp
index 243d7c7f24b..6cd8f9090e0 100644
--- a/Framework/Algorithms/src/PointByPointVCorrection.cpp
+++ b/Framework/Algorithms/src/PointByPointVCorrection.cpp
@@ -2,7 +2,10 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/PointByPointVCorrection.h"
+#include "MantidAPI/Axis.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/VectorHelper.h"
+
 #include <cfloat>
 #include <cmath>
 #include <numeric>
diff --git a/Framework/Algorithms/src/PolarizationCorrection.cpp b/Framework/Algorithms/src/PolarizationCorrection.cpp
index 022123f7620..c89ff49a920 100644
--- a/Framework/Algorithms/src/PolarizationCorrection.cpp
+++ b/Framework/Algorithms/src/PolarizationCorrection.cpp
@@ -1,14 +1,17 @@
 #include "MantidAlgorithms/PolarizationCorrection.h"
-#include "MantidAPI/WorkspaceGroup.h"
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/WorkspaceFactory.h"
-#include "MantidKernel/Unit.h"
+#include "MantidAPI/WorkspaceGroup.h"
+#include "MantidDataObjects/WorkspaceSingleValue.h"
 #include "MantidKernel/ArrayProperty.h"
-#include "MantidGeometry/Instrument.h"
 #include "MantidKernel/ListValidator.h"
-#include "MantidDataObjects/WorkspaceSingleValue.h"
-#include <algorithm>
+#include "MantidKernel/Unit.h"
+#include "MantidGeometry/Instrument.h"
+
 #include <boost/shared_ptr.hpp>
 
+#include <algorithm>
+
 using namespace Mantid::API;
 using namespace Mantid::Kernel;
 using namespace Mantid::Geometry;
diff --git a/Framework/Algorithms/src/Q1D2.cpp b/Framework/Algorithms/src/Q1D2.cpp
index 08fa59f1b54..d6beb0c1fa6 100644
--- a/Framework/Algorithms/src/Q1D2.cpp
+++ b/Framework/Algorithms/src/Q1D2.cpp
@@ -3,6 +3,7 @@
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/Q1D2.h"
 #include "MantidAlgorithms/Qhelper.h"
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/CommonBinsValidator.h"
 #include "MantidAPI/HistogramValidator.h"
 #include "MantidAPI/InstrumentValidator.h"
diff --git a/Framework/Algorithms/src/Q1DWeighted.cpp b/Framework/Algorithms/src/Q1DWeighted.cpp
index e77e43b04d7..2027fafb7f6 100644
--- a/Framework/Algorithms/src/Q1DWeighted.cpp
+++ b/Framework/Algorithms/src/Q1DWeighted.cpp
@@ -2,6 +2,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/Q1DWeighted.h"
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/HistogramValidator.h"
 #include "MantidAPI/InstrumentValidator.h"
 #include "MantidAPI/WorkspaceUnitValidator.h"
diff --git a/Framework/Algorithms/src/Qhelper.cpp b/Framework/Algorithms/src/Qhelper.cpp
index 24aee75250f..5e56dae7006 100644
--- a/Framework/Algorithms/src/Qhelper.cpp
+++ b/Framework/Algorithms/src/Qhelper.cpp
@@ -2,6 +2,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/Qhelper.h"
+#include "MantidAPI/MatrixWorkspace.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/src/RRFMuon.cpp b/Framework/Algorithms/src/RRFMuon.cpp
index 7709d5485bc..ee6de5af288 100644
--- a/Framework/Algorithms/src/RRFMuon.cpp
+++ b/Framework/Algorithms/src/RRFMuon.cpp
@@ -2,6 +2,8 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/RRFMuon.h"
+#include "MantidAPI/Axis.h"
+#include "MantidAPI/MatrixWorkspace.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/src/RadiusSum.cpp b/Framework/Algorithms/src/RadiusSum.cpp
index 02e591ce158..2a2398083cb 100644
--- a/Framework/Algorithms/src/RadiusSum.cpp
+++ b/Framework/Algorithms/src/RadiusSum.cpp
@@ -1,16 +1,19 @@
 #include "MantidAlgorithms/RadiusSum.h"
+#include "MantidAPI/NumericAxis.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/VisibleWhenProperty.h"
 #include "MantidKernel/ArrayLengthValidator.h"
 #include "MantidKernel/BoundedValidator.h"
 #include "MantidKernel/ArrayProperty.h"
-#include "MantidAPI/NumericAxis.h"
 #include "MantidGeometry/IObjComponent.h"
 #include "MantidKernel/UnitFactory.h"
-#include <numeric>
+
+#include <boost/foreach.hpp>
+
 #include <limits>
 #include <math.h>
+#include <numeric>
 #include <sstream>
-#include <boost/foreach.hpp>
 
 using namespace Mantid::Kernel;
 
diff --git a/Framework/Algorithms/src/Rebin.cpp b/Framework/Algorithms/src/Rebin.cpp
index a94737ebf52..7269a08a43d 100644
--- a/Framework/Algorithms/src/Rebin.cpp
+++ b/Framework/Algorithms/src/Rebin.cpp
@@ -3,6 +3,7 @@
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/Rebin.h"
 
+#include "MantidAPI/Axis.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidDataObjects/EventList.h"
 #include "MantidKernel/ArrayProperty.h"
diff --git a/Framework/Algorithms/src/RebinByTimeAtSample.cpp b/Framework/Algorithms/src/RebinByTimeAtSample.cpp
index 5dcefd704e8..5a3a816bd91 100644
--- a/Framework/Algorithms/src/RebinByTimeAtSample.cpp
+++ b/Framework/Algorithms/src/RebinByTimeAtSample.cpp
@@ -4,7 +4,9 @@
 #include "MantidKernel/VectorHelper.h"
 #include "MantidKernel/Unit.h"
 #include "MantidKernel/V3D.h"
+
 #include <boost/make_shared.hpp>
+
 #include <algorithm>
 #include <cmath>
 
diff --git a/Framework/Algorithms/src/RebinByTimeBase.cpp b/Framework/Algorithms/src/RebinByTimeBase.cpp
index 84fe544d906..0f6a718e48f 100644
--- a/Framework/Algorithms/src/RebinByTimeBase.cpp
+++ b/Framework/Algorithms/src/RebinByTimeBase.cpp
@@ -1,4 +1,5 @@
 #include "MantidAlgorithms/RebinByTimeBase.h"
+#include "MantidAPI/Axis.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidKernel/ArrayProperty.h"
 #include "MantidKernel/RebinParamsValidator.h"
diff --git a/Framework/Algorithms/src/Rebunch.cpp b/Framework/Algorithms/src/Rebunch.cpp
index c06947f65ca..d9d6b846850 100644
--- a/Framework/Algorithms/src/Rebunch.cpp
+++ b/Framework/Algorithms/src/Rebunch.cpp
@@ -2,12 +2,14 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/Rebunch.h"
+#include "MantidAPI/Axis.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidAPI/Workspace_fwd.h"
+#include "MantidKernel/BoundedValidator.h"
 
-#include <sstream>
-#include <numeric>
 #include <cmath>
-#include "MantidKernel/BoundedValidator.h"
+#include <numeric>
+#include <sstream>
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/src/ReflectometryReductionOne.cpp b/Framework/Algorithms/src/ReflectometryReductionOne.cpp
index 69118f847eb..ab962e9b1fb 100644
--- a/Framework/Algorithms/src/ReflectometryReductionOne.cpp
+++ b/Framework/Algorithms/src/ReflectometryReductionOne.cpp
@@ -1,4 +1,5 @@
 #include "MantidAlgorithms/ReflectometryReductionOne.h"
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/MatrixWorkspace.h"
 #include "MantidAPI/WorkspaceFactory.h"
 #include "MantidAPI/WorkspaceUnitValidator.h"
diff --git a/Framework/Algorithms/src/Regroup.cpp b/Framework/Algorithms/src/Regroup.cpp
index dbc900ef9c2..a1f7a1b5daa 100644
--- a/Framework/Algorithms/src/Regroup.cpp
+++ b/Framework/Algorithms/src/Regroup.cpp
@@ -2,16 +2,17 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/Regroup.h"
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/CommonBinsValidator.h"
 #include "MantidAPI/HistogramValidator.h"
 #include "MantidKernel/ArrayProperty.h"
 #include "MantidKernel/CompositeValidator.h"
 #include "MantidKernel/RebinParamsValidator.h"
 
-#include <numeric>
 #include <algorithm>
-#include <functional>
 #include <cmath>
+#include <functional>
+#include <numeric>
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/src/RemoveBackground.cpp b/Framework/Algorithms/src/RemoveBackground.cpp
index f81aaedaded..d169942757d 100644
--- a/Framework/Algorithms/src/RemoveBackground.cpp
+++ b/Framework/Algorithms/src/RemoveBackground.cpp
@@ -3,6 +3,7 @@
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/RemoveBackground.h"
 
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/InstrumentValidator.h"
 #include "MantidAPI/HistogramValidator.h"
 #include "MantidAPI/WorkspaceUnitValidator.h"
diff --git a/Framework/Algorithms/src/RemoveBins.cpp b/Framework/Algorithms/src/RemoveBins.cpp
index 8493a2c8e5b..a2ecede68a9 100644
--- a/Framework/Algorithms/src/RemoveBins.cpp
+++ b/Framework/Algorithms/src/RemoveBins.cpp
@@ -2,12 +2,15 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/RemoveBins.h"
+
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/HistogramValidator.h"
 #include "MantidAPI/WorkspaceUnitValidator.h"
 #include "MantidKernel/BoundedValidator.h"
 #include "MantidKernel/CompositeValidator.h"
 #include "MantidKernel/ListValidator.h"
 #include "MantidKernel/MandatoryValidator.h"
+#include "MantidKernel/Unit.h"
 #include "MantidKernel/UnitFactory.h"
 
 namespace Mantid {
diff --git a/Framework/Algorithms/src/RemoveExpDecay.cpp b/Framework/Algorithms/src/RemoveExpDecay.cpp
index 3d72cc2528b..e6598b840d5 100644
--- a/Framework/Algorithms/src/RemoveExpDecay.cpp
+++ b/Framework/Algorithms/src/RemoveExpDecay.cpp
@@ -1,14 +1,15 @@
 //----------------------------------------------------------------------
 // Includes
 //----------------------------------------------------------------------
-#include <cmath>
-#include <vector>
-
-#include "MantidAPI/Workspace_fwd.h"
+#include "MantidAlgorithms/RemoveExpDecay.h"
 #include "MantidAPI/IFunction.h"
+#include "MantidAPI/MatrixWorkspace.h"
+#include "MantidAPI/Workspace_fwd.h"
 #include "MantidKernel/PhysicalConstants.h"
 #include "MantidKernel/ArrayProperty.h"
-#include "MantidAlgorithms/RemoveExpDecay.h"
+
+#include <cmath>
+#include <vector>
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/src/RenameWorkspace.cpp b/Framework/Algorithms/src/RenameWorkspace.cpp
index 35c2babaeb3..9a289c8bbe3 100644
--- a/Framework/Algorithms/src/RenameWorkspace.cpp
+++ b/Framework/Algorithms/src/RenameWorkspace.cpp
@@ -3,6 +3,7 @@
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/RenameWorkspace.h"
 #include "MantidAPI/FrameworkManager.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/Exception.h"
 
 namespace Mantid {
diff --git a/Framework/Algorithms/src/ResampleX.cpp b/Framework/Algorithms/src/ResampleX.cpp
index c9515604861..0bc07cbdb58 100644
--- a/Framework/Algorithms/src/ResampleX.cpp
+++ b/Framework/Algorithms/src/ResampleX.cpp
@@ -1,10 +1,12 @@
 #include "MantidAlgorithms/ResampleX.h"
+#include "MantidAPI/Axis.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidKernel/ArrayProperty.h"
 #include "MantidKernel/BoundedValidator.h"
 #include "MantidKernel/VectorHelper.h"
 
 #include <boost/math/special_functions/fpclassify.hpp>
+
 #include <sstream>
 
 namespace Mantid {
diff --git a/Framework/Algorithms/src/SassenaFFT.cpp b/Framework/Algorithms/src/SassenaFFT.cpp
index bd0e048fd71..83b1edab1df 100644
--- a/Framework/Algorithms/src/SassenaFFT.cpp
+++ b/Framework/Algorithms/src/SassenaFFT.cpp
@@ -2,12 +2,15 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/SassenaFFT.h"
+
+#include "MantidAPI/Axis.h"
+#include "MantidAPI/FileProperty.h"
+#include "MantidAPI/IAlgorithm.h"
+#include "MantidAPI/MatrixWorkspace.h"
+#include "MantidAPI/WorkspaceGroup.h"
+#include "MantidDataObjects/Workspace2D.h"
 #include "MantidKernel/EnabledWhenProperty.h"
 #include "MantidKernel/UnitFactory.h"
-#include "MantidDataObjects/Workspace2D.h"
-#include "MantidAPI/WorkspaceGroup.h"
-#include "MantidAPI/IAlgorithm.h"
-#include "MantidAPI/FileProperty.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/src/Scale.cpp b/Framework/Algorithms/src/Scale.cpp
index c7260b9eed5..c01758118cc 100644
--- a/Framework/Algorithms/src/Scale.cpp
+++ b/Framework/Algorithms/src/Scale.cpp
@@ -2,6 +2,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/Scale.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/ListValidator.h"
 
 namespace Mantid {
diff --git a/Framework/Algorithms/src/ScaleX.cpp b/Framework/Algorithms/src/ScaleX.cpp
index bda4858bc05..74380f287a3 100644
--- a/Framework/Algorithms/src/ScaleX.cpp
+++ b/Framework/Algorithms/src/ScaleX.cpp
@@ -2,6 +2,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/ScaleX.h"
+#include "MantidAPI/Axis.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidKernel/BoundedValidator.h"
 #include "MantidKernel/ListValidator.h"
diff --git a/Framework/Algorithms/src/SetInstrumentParameter.cpp b/Framework/Algorithms/src/SetInstrumentParameter.cpp
index f76d23abf47..f3ab5f437f2 100644
--- a/Framework/Algorithms/src/SetInstrumentParameter.cpp
+++ b/Framework/Algorithms/src/SetInstrumentParameter.cpp
@@ -1,5 +1,6 @@
 #include "MantidAlgorithms/SetInstrumentParameter.h"
 #include "MantidAPI/InstrumentValidator.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidGeometry/Instrument.h"
 #include "MantidKernel/ArrayProperty.h"
 #include "MantidKernel/ListValidator.h"
diff --git a/Framework/Algorithms/src/SetUncertainties.cpp b/Framework/Algorithms/src/SetUncertainties.cpp
index 181341ef4e6..14f44856687 100644
--- a/Framework/Algorithms/src/SetUncertainties.cpp
+++ b/Framework/Algorithms/src/SetUncertainties.cpp
@@ -2,7 +2,9 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/SetUncertainties.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/ListValidator.h"
+
 #include <vector>
 
 namespace Mantid {
diff --git a/Framework/Algorithms/src/ShiftLogTime.cpp b/Framework/Algorithms/src/ShiftLogTime.cpp
index c991b5e5ebb..6c0d284bc4e 100644
--- a/Framework/Algorithms/src/ShiftLogTime.cpp
+++ b/Framework/Algorithms/src/ShiftLogTime.cpp
@@ -1,6 +1,8 @@
 #include "MantidAlgorithms/ShiftLogTime.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/System.h"
 #include "MantidKernel/TimeSeriesProperty.h"
+
 #include <sstream>
 
 using namespace Mantid::Kernel;
diff --git a/Framework/Algorithms/src/SolidAngle.cpp b/Framework/Algorithms/src/SolidAngle.cpp
index b1d092b70ba..332051ef39e 100644
--- a/Framework/Algorithms/src/SolidAngle.cpp
+++ b/Framework/Algorithms/src/SolidAngle.cpp
@@ -3,6 +3,7 @@
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/SolidAngle.h"
 #include "MantidAPI/InstrumentValidator.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/BoundedValidator.h"
 #include "MantidKernel/UnitFactory.h"
 
diff --git a/Framework/Algorithms/src/SpecularReflectionAlgorithm.cpp b/Framework/Algorithms/src/SpecularReflectionAlgorithm.cpp
index 6433f21b021..532424b9cdb 100644
--- a/Framework/Algorithms/src/SpecularReflectionAlgorithm.cpp
+++ b/Framework/Algorithms/src/SpecularReflectionAlgorithm.cpp
@@ -1,5 +1,6 @@
 #include "MantidAlgorithms/SpecularReflectionAlgorithm.h"
 
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/ArrayBoundedValidator.h"
 #include "MantidKernel/ArrayProperty.h"
 #include "MantidKernel/EnabledWhenProperty.h"
@@ -8,7 +9,6 @@
 #include "MantidGeometry/Instrument/ReferenceFrame.h"
 #include "MantidGeometry/Instrument/ComponentHelper.h"
 
-#include <vector>
 #include <boost/make_shared.hpp>
 
 using namespace Mantid::Kernel;
diff --git a/Framework/Algorithms/src/SpecularReflectionCalculateTheta.cpp b/Framework/Algorithms/src/SpecularReflectionCalculateTheta.cpp
index 69f1a6b9001..00bb4505795 100644
--- a/Framework/Algorithms/src/SpecularReflectionCalculateTheta.cpp
+++ b/Framework/Algorithms/src/SpecularReflectionCalculateTheta.cpp
@@ -1,8 +1,10 @@
 #include "MantidAlgorithms/SpecularReflectionCalculateTheta.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/PropertyWithValue.h"
 #include "MantidGeometry/IComponent.h"
 #include "MantidGeometry/Instrument.h"
 #include "MantidGeometry/Instrument/ReferenceFrame.h"
+
 #include <cmath>
 
 using namespace Mantid::Kernel;
diff --git a/Framework/Algorithms/src/SpecularReflectionPositionCorrect.cpp b/Framework/Algorithms/src/SpecularReflectionPositionCorrect.cpp
index f4815b2314e..f8ec25f527f 100644
--- a/Framework/Algorithms/src/SpecularReflectionPositionCorrect.cpp
+++ b/Framework/Algorithms/src/SpecularReflectionPositionCorrect.cpp
@@ -1,4 +1,6 @@
 #include "MantidAlgorithms/SpecularReflectionPositionCorrect.h"
+
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidGeometry/Instrument/ComponentHelper.h"
 #include "MantidGeometry/Instrument/DetectorGroup.h"
 #include "MantidGeometry/Instrument/ReferenceFrame.h"
diff --git a/Framework/Algorithms/src/SphericalAbsorption.cpp b/Framework/Algorithms/src/SphericalAbsorption.cpp
index 12ac3bf0368..960170bd1b5 100644
--- a/Framework/Algorithms/src/SphericalAbsorption.cpp
+++ b/Framework/Algorithms/src/SphericalAbsorption.cpp
@@ -3,6 +3,7 @@
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/SphericalAbsorption.h"
 #include "MantidAPI/InstrumentValidator.h"
+#include "MantidAPI/Sample.h"
 #include "MantidAPI/WorkspaceUnitValidator.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidDataObjects/Workspace2D.h"
diff --git a/Framework/Algorithms/src/StripPeaks.cpp b/Framework/Algorithms/src/StripPeaks.cpp
index db9b8546983..ac67c3d69d9 100644
--- a/Framework/Algorithms/src/StripPeaks.cpp
+++ b/Framework/Algorithms/src/StripPeaks.cpp
@@ -1,10 +1,12 @@
 #include "MantidAlgorithms/StripPeaks.h"
-#include "MantidKernel/ArrayProperty.h"
-#include "MantidKernel/PhysicalConstants.h"
+
 #include "MantidAPI/ITableWorkspace.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidAPI/TableRow.h"
+#include "MantidKernel/ArrayProperty.h"
 #include "MantidKernel/BoundedValidator.h"
 #include "MantidKernel/ListValidator.h"
+#include "MantidKernel/PhysicalConstants.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/src/StripVanadiumPeaks.cpp b/Framework/Algorithms/src/StripVanadiumPeaks.cpp
index 491687e7948..b21162923f5 100644
--- a/Framework/Algorithms/src/StripVanadiumPeaks.cpp
+++ b/Framework/Algorithms/src/StripVanadiumPeaks.cpp
@@ -1,4 +1,5 @@
 #include "MantidAlgorithms/StripVanadiumPeaks.h"
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/TableRow.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidKernel/BoundedValidator.h"
diff --git a/Framework/Algorithms/src/StripVanadiumPeaks2.cpp b/Framework/Algorithms/src/StripVanadiumPeaks2.cpp
index f235a74d3ee..7883ad7b560 100644
--- a/Framework/Algorithms/src/StripVanadiumPeaks2.cpp
+++ b/Framework/Algorithms/src/StripVanadiumPeaks2.cpp
@@ -1,5 +1,7 @@
 #include "MantidAlgorithms/StripVanadiumPeaks2.h"
-#include "MantidKernel/System.h"
+
+#include "MantidAPI/Axis.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/BoundedValidator.h"
 #include "MantidKernel/ListValidator.h"
 
diff --git a/Framework/Algorithms/src/SumEventsByLogValue.cpp b/Framework/Algorithms/src/SumEventsByLogValue.cpp
index 84b0d7200c6..c06153f72f6 100644
--- a/Framework/Algorithms/src/SumEventsByLogValue.cpp
+++ b/Framework/Algorithms/src/SumEventsByLogValue.cpp
@@ -1,10 +1,13 @@
 #include "MantidAlgorithms/SumEventsByLogValue.h"
+
+#include "MantidAPI/Axis.h"
+#include "MantidAPI/Column.h"
+#include "MantidAPI/ITableWorkspace.h"
+#include "MantidKernel/ArrayProperty.h"
 #include "MantidKernel/MandatoryValidator.h"
 #include "MantidKernel/RebinParamsValidator.h"
-#include "MantidKernel/ArrayProperty.h"
 #include "MantidKernel/VectorHelper.h"
-#include "MantidAPI/ITableWorkspace.h"
-#include "MantidAPI/Column.h"
+
 #include <numeric>
 
 namespace Mantid {
diff --git a/Framework/Algorithms/src/SumRowColumn.cpp b/Framework/Algorithms/src/SumRowColumn.cpp
index e0f8f38ecf5..5c9f2b8bc05 100644
--- a/Framework/Algorithms/src/SumRowColumn.cpp
+++ b/Framework/Algorithms/src/SumRowColumn.cpp
@@ -2,8 +2,11 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/SumRowColumn.h"
+#include "MantidAPI/Axis.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/BoundedValidator.h"
 #include "MantidKernel/ListValidator.h"
+#include "MantidKernel/Unit.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/src/UnwrapMonitor.cpp b/Framework/Algorithms/src/UnwrapMonitor.cpp
index e9c4145b08b..c586f2425a5 100644
--- a/Framework/Algorithms/src/UnwrapMonitor.cpp
+++ b/Framework/Algorithms/src/UnwrapMonitor.cpp
@@ -2,6 +2,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/UnwrapMonitor.h"
+#include "MantidAPI/Axis.h"
 #include "MantidAPI/HistogramValidator.h"
 #include "MantidAPI/InstrumentValidator.h"
 #include "MantidAPI/RawCountValidator.h"
diff --git a/Framework/Algorithms/src/VesuvioL1ThetaResolution.cpp b/Framework/Algorithms/src/VesuvioL1ThetaResolution.cpp
index 87d9ba560e1..07d728d70b5 100644
--- a/Framework/Algorithms/src/VesuvioL1ThetaResolution.cpp
+++ b/Framework/Algorithms/src/VesuvioL1ThetaResolution.cpp
@@ -2,6 +2,7 @@
 
 #include "MantidAPI/AlgorithmManager.h"
 #include "MantidAPI/FileProperty.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidAPI/TextAxis.h"
 #include "MantidKernel/BoundedValidator.h"
 #include "MantidKernel/Statistics.h"
diff --git a/Framework/Algorithms/src/WienerSmooth.cpp b/Framework/Algorithms/src/WienerSmooth.cpp
index f8762cd5a56..3a03aab2a00 100644
--- a/Framework/Algorithms/src/WienerSmooth.cpp
+++ b/Framework/Algorithms/src/WienerSmooth.cpp
@@ -1,6 +1,8 @@
 #include "MantidAlgorithms/WienerSmooth.h"
+
 #include "MantidAPI/IFunction.h"
 #include "MantidAPI/FunctionFactory.h"
+#include "MantidAPI/MatrixWorkspace.h"
 #include "MantidAPI/TextAxis.h"
 #include "MantidKernel/ArrayProperty.h"
 
diff --git a/Framework/Algorithms/src/WorkspaceJoiners.cpp b/Framework/Algorithms/src/WorkspaceJoiners.cpp
index baaac9dde5d..53a03c65958 100644
--- a/Framework/Algorithms/src/WorkspaceJoiners.cpp
+++ b/Framework/Algorithms/src/WorkspaceJoiners.cpp
@@ -3,6 +3,8 @@
 //----------------------------------------------------------------------
 #include "MantidAlgorithms/WorkspaceJoiners.h"
 
+#include "MantidAPI/Axis.h"
+
 namespace Mantid {
 namespace Algorithms {
 
diff --git a/Framework/Algorithms/src/XDataConverter.cpp b/Framework/Algorithms/src/XDataConverter.cpp
index 159eec0fb5d..6c0ba84948b 100644
--- a/Framework/Algorithms/src/XDataConverter.cpp
+++ b/Framework/Algorithms/src/XDataConverter.cpp
@@ -2,6 +2,8 @@
 // Includes
 //------------------------------------------------------------------------------
 #include "MantidAlgorithms/XDataConverter.h"
+#include "MantidAPI/Axis.h"
+#include "MantidAPI/MatrixWorkspace.h"
 
 namespace Mantid {
 namespace Algorithms {
-- 
GitLab