diff --git a/Code/Mantid/Framework/Algorithms/CMakeLists.txt b/Code/Mantid/Framework/Algorithms/CMakeLists.txt
index ea536a1082015bea509940732186af2392dd1408..65ffed80db68938503f967bc4c62af4fc17e8956 100644
--- a/Code/Mantid/Framework/Algorithms/CMakeLists.txt
+++ b/Code/Mantid/Framework/Algorithms/CMakeLists.txt
@@ -197,6 +197,7 @@ set ( SRC_FILES
 	src/RemoveBins.cpp
 	src/RemoveExpDecay.cpp
 	src/RemoveLowResTOF.cpp
+	src/RemoveMaskedSpectra.cpp
 	src/RemovePromptPulse.cpp
 	src/RemoveWorkspaceHistory.cpp
 	src/RenameWorkspace.cpp
@@ -455,6 +456,7 @@ set ( INC_FILES
 	inc/MantidAlgorithms/RemoveBins.h
 	inc/MantidAlgorithms/RemoveExpDecay.h
 	inc/MantidAlgorithms/RemoveLowResTOF.h
+	inc/MantidAlgorithms/RemoveMaskedSpectra.h
 	inc/MantidAlgorithms/RemovePromptPulse.h
 	inc/MantidAlgorithms/RemoveWorkspaceHistory.h
 	inc/MantidAlgorithms/RenameWorkspace.h
@@ -706,6 +708,7 @@ set ( TEST_FILES
 	RemoveBinsTest.h
 	RemoveExpDecayTest.h
 	RemoveLowResTOFTest.h
+	RemoveMaskedSpectraTest.h
 	RemovePromptPulseTest.h
 	RemoveWorkspaceHistoryTest.h
 	RenameWorkspaceTest.h
diff --git a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/CropWorkspaceByMask.h b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/RemoveMaskedSpectra.h
similarity index 68%
rename from Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/CropWorkspaceByMask.h
rename to Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/RemoveMaskedSpectra.h
index 0bb6410aa56573d02b1a02ff6b4a96418500e3b2..278be3d8abe422031e99de941ae10948d154b849 100644
--- a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/CropWorkspaceByMask.h
+++ b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/RemoveMaskedSpectra.h
@@ -1,14 +1,13 @@
-#ifndef MANTID_DATAHANDLING_CROPWORKSPACEBYMASK_H_
-#define MANTID_DATAHANDLING_CROPWORKSPACEBYMASK_H_
+#ifndef MANTID_ALGORITHMS_REMOVEMASKEDSPECTRA_H_
+#define MANTID_ALGORITHMS_REMOVEMASKEDSPECTRA_H_
 
 #include "MantidKernel/System.h"
 #include "MantidAPI/Algorithm.h"
 
 namespace Mantid {
-namespace DataHandling {
+namespace Algorithms {
 
-/** CropWorkspaceByMask crops a MatrixWorkspace by a mask. It removes all masked
-  spectra.
+/** RemoveMaskedSpectra removes all masked spectra.
 
   Copyright © 2015 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge
   National Laboratory & European Spallation Source
@@ -31,10 +30,10 @@ namespace DataHandling {
   File change history is stored at: <https://github.com/mantidproject/mantid>
   Code Documentation is available at: <http://doxygen.mantidproject.org>
 */
-class DLLExport CropWorkspaceByMask : public API::Algorithm {
+class DLLExport RemoveMaskedSpectra : public API::Algorithm {
 public:
-  CropWorkspaceByMask();
-  virtual ~CropWorkspaceByMask();
+  RemoveMaskedSpectra();
+  virtual ~RemoveMaskedSpectra();
 
   virtual const std::string name() const;
   virtual int version() const;
@@ -44,11 +43,11 @@ public:
 private:
   void init();
   void exec();
-  /// Fill in a vector with spectra indices to be extracted.
-  void makeIndexList(std::vector<size_t>& indices, const API::MatrixWorkspace* maskedWorkspace);
+  void makeIndexList(std::vector<size_t> &indices,
+                     const API::MatrixWorkspace *maskedWorkspace);
 };
 
-} // namespace DataHandling
+} // namespace Algorithms
 } // namespace Mantid
 
-#endif /* MANTID_DATAHANDLING_CROPWORKSPACEBYMASK_H_ */
\ No newline at end of file
+#endif /* MANTID_ALGORITHMS_REMOVEMASKEDSPECTRA_H_ */
\ No newline at end of file
diff --git a/Code/Mantid/Framework/DataHandling/src/CropWorkspaceByMask.cpp b/Code/Mantid/Framework/Algorithms/src/RemoveMaskedSpectra.cpp
similarity index 75%
rename from Code/Mantid/Framework/DataHandling/src/CropWorkspaceByMask.cpp
rename to Code/Mantid/Framework/Algorithms/src/RemoveMaskedSpectra.cpp
index 24eb68351922def8ca6b681b34b390555ad3c98b..fc6abed8ff18488361318cecd70288d44093422d 100644
--- a/Code/Mantid/Framework/DataHandling/src/CropWorkspaceByMask.cpp
+++ b/Code/Mantid/Framework/Algorithms/src/RemoveMaskedSpectra.cpp
@@ -1,48 +1,51 @@
-#include "MantidDataHandling/CropWorkspaceByMask.h"
+#include "MantidAlgorithms/RemoveMaskedSpectra.h"
 #include "MantidDataObjects/MaskWorkspace.h"
 #include "MantidAPI/WorkspaceFactory.h"
 
 namespace Mantid {
-namespace DataHandling {
+namespace Algorithms {
 
 using namespace Kernel;
 using namespace API;
 
 // Register the algorithm into the AlgorithmFactory
-DECLARE_ALGORITHM(CropWorkspaceByMask)
+DECLARE_ALGORITHM(RemoveMaskedSpectra)
 
 //----------------------------------------------------------------------------------------------
-/// Constructor
-CropWorkspaceByMask::CropWorkspaceByMask() {}
+/** Constructor
+ */
+RemoveMaskedSpectra::RemoveMaskedSpectra() {}
 
 //----------------------------------------------------------------------------------------------
-/// Destructor
-CropWorkspaceByMask::~CropWorkspaceByMask() {}
+/** Destructor
+ */
+RemoveMaskedSpectra::~RemoveMaskedSpectra() {}
 
 //----------------------------------------------------------------------------------------------
 
 /// Algorithms name for identification. @see Algorithm::name
-const std::string CropWorkspaceByMask::name() const {
-  return "CropWorkspaceByMask";
+const std::string RemoveMaskedSpectra::name() const {
+  return "RemoveMaskedSpectra";
 }
 
 /// Algorithm's version for identification. @see Algorithm::version
-int CropWorkspaceByMask::version() const { return 1; };
+int RemoveMaskedSpectra::version() const { return 1; };
 
 /// Algorithm's category for identification. @see Algorithm::category
-const std::string CropWorkspaceByMask::category() const {
+const std::string RemoveMaskedSpectra::category() const {
   return "Transforms\\Splitting";
 }
 
 /// Algorithm's summary for use in the GUI and help. @see Algorithm::summary
-const std::string CropWorkspaceByMask::summary() const {
+const std::string RemoveMaskedSpectra::summary() const {
   return "Extracts unmasked spectra from a workspace and places them in a new "
          "workspace.";
 }
 
 //----------------------------------------------------------------------------------------------
-/// Initialize the algorithm's properties.
-void CropWorkspaceByMask::init() {
+/** Initialize the algorithm's properties.
+ */
+void RemoveMaskedSpectra::init() {
   declareProperty(
       new WorkspaceProperty<>("InputWorkspace", "", Direction::Input),
       "An input workspace.");
@@ -58,12 +61,17 @@ void CropWorkspaceByMask::init() {
 }
 
 //----------------------------------------------------------------------------------------------
-/// Execute the algorithm.
-void CropWorkspaceByMask::exec() {
+/** Execute the algorithm.
+ */
+void RemoveMaskedSpectra::exec() {
   MatrixWorkspace_sptr inputWorkspace = getProperty("InputWorkspace");
   MatrixWorkspace_sptr maskedWorkspace = getProperty("MaskedWorkspace");
 
-  if ( !maskedWorkspace ) maskedWorkspace = inputWorkspace;
+  if (!maskedWorkspace){
+    maskedWorkspace = inputWorkspace;
+  } else if (inputWorkspace->getNumberHistograms() != maskedWorkspace->getNumberHistograms()) {
+    throw std::runtime_error("Masked workspace has a different number of spectra.");
+  }
 
   std::vector<size_t> indices;
   makeIndexList(indices, maskedWorkspace.get());
@@ -72,19 +80,22 @@ void CropWorkspaceByMask::exec() {
   size_t nSpectra = indices.size();
   // Number of bins/data points in the cropped workspace.
   size_t nBins = inputWorkspace->blocksize();
-  size_t histogram = inputWorkspace->isHistogramData()? 1 : 0;
+  size_t histogram = inputWorkspace->isHistogramData() ? 1 : 0;
 
   // Create the output workspace
   MatrixWorkspace_sptr outputWorkspace = WorkspaceFactory::Instance().create(
       inputWorkspace, nSpectra, nBins, nBins - histogram);
 
+  for (size_t i = 0; i < nSpectra; ++i) {
+    auto j = indices[i];
+  }
 }
 
 //----------------------------------------------------------------------------------------------
 /// Fill in a vector with spectra indices to be extracted.
 /// @param indices :: A reference to a vector to fill with the indices.
 /// @param maskedWorkspace :: A workspace with masking information.
-void CropWorkspaceByMask::makeIndexList(
+void RemoveMaskedSpectra::makeIndexList(
     std::vector<size_t> &indices, const API::MatrixWorkspace *maskedWorkspace) {
   auto mask = dynamic_cast<const DataObjects::MaskWorkspace *>(maskedWorkspace);
   if (mask) {
@@ -101,7 +112,6 @@ void CropWorkspaceByMask::makeIndexList(
       } catch (Exception::NotFoundError &) {
         continue;
       }
-
       if (det->isMasked()) {
         indices.push_back(i);
       }
@@ -109,5 +119,5 @@ void CropWorkspaceByMask::makeIndexList(
   }
 }
 
-} // namespace DataHandling
+} // namespace Algorithms
 } // namespace Mantid
\ No newline at end of file
diff --git a/Code/Mantid/Framework/DataHandling/test/CropWorkspaceByMaskTest.h b/Code/Mantid/Framework/Algorithms/test/RemoveMaskedSpectraTest.h
similarity index 67%
rename from Code/Mantid/Framework/DataHandling/test/CropWorkspaceByMaskTest.h
rename to Code/Mantid/Framework/Algorithms/test/RemoveMaskedSpectraTest.h
index 60f3e58d9acf293aa0f31f17adba4b00e4f7169f..b0e27bdc6340180467837f4fffa29661cc0602e8 100644
--- a/Code/Mantid/Framework/DataHandling/test/CropWorkspaceByMaskTest.h
+++ b/Code/Mantid/Framework/Algorithms/test/RemoveMaskedSpectraTest.h
@@ -1,25 +1,25 @@
-#ifndef MANTID_DATAHANDLING_CROPWORKSPACEBYMASKTEST_H_
-#define MANTID_DATAHANDLING_CROPWORKSPACEBYMASKTEST_H_
+#ifndef MANTID_ALGORITHMS_REMOVEMASKEDSPECTRATEST_H_
+#define MANTID_ALGORITHMS_REMOVEMASKEDSPECTRATEST_H_
 
 #include <cxxtest/TestSuite.h>
 
-#include "MantidDataHandling/CropWorkspaceByMask.h"
+#include "MantidAlgorithms/RemoveMaskedSpectra.h"
 
-using Mantid::DataHandling::CropWorkspaceByMask;
+using Mantid::Algorithms::RemoveMaskedSpectra;
 using namespace Mantid::API;
 
-class CropWorkspaceByMaskTest : public CxxTest::TestSuite
+class RemoveMaskedSpectraTest : public CxxTest::TestSuite
 {
 public:
   // This pair of boilerplate methods prevent the suite being created statically
   // This means the constructor isn't called when running other tests
-  static CropWorkspaceByMaskTest *createSuite() { return new CropWorkspaceByMaskTest(); }
-  static void destroySuite( CropWorkspaceByMaskTest *suite ) { delete suite; }
+  static RemoveMaskedSpectraTest *createSuite() { return new RemoveMaskedSpectraTest(); }
+  static void destroySuite( RemoveMaskedSpectraTest *suite ) { delete suite; }
 
 
   void test_Init()
   {
-    CropWorkspaceByMask alg;
+    RemoveMaskedSpectra alg;
     TS_ASSERT_THROWS_NOTHING( alg.initialize() )
     TS_ASSERT( alg.isInitialized() )
   }
@@ -27,9 +27,9 @@ public:
   void test_exec()
   {
     // Name of the output workspace.
-    std::string outWSName("CropWorkspaceByMaskTest_OutputWS");
+    std::string outWSName("RemoveMaskedSpectraTest_OutputWS");
 
-    CropWorkspaceByMask alg;
+    RemoveMaskedSpectra alg;
     TS_ASSERT_THROWS_NOTHING( alg.initialize() )
     TS_ASSERT( alg.isInitialized() )
     TS_ASSERT_THROWS_NOTHING( alg.setPropertyValue("REPLACE_PROPERTY_NAME_HERE!!!!", "value") );
@@ -58,4 +58,4 @@ public:
 };
 
 
-#endif /* MANTID_DATAHANDLING_CROPWORKSPACEBYMASKTEST_H_ */
\ No newline at end of file
+#endif /* MANTID_ALGORITHMS_REMOVEMASKEDSPECTRATEST_H_ */
\ No newline at end of file
diff --git a/Code/Mantid/Framework/DataHandling/CMakeLists.txt b/Code/Mantid/Framework/DataHandling/CMakeLists.txt
index f453d1d8ab59fda78b976d08b1742b96a2e05b52..af53459069106a5d60fb422bba839acda00fc1a5 100644
--- a/Code/Mantid/Framework/DataHandling/CMakeLists.txt
+++ b/Code/Mantid/Framework/DataHandling/CMakeLists.txt
@@ -7,7 +7,6 @@ set ( SRC_FILES
 	src/CreateModeratorModel.cpp
 	src/CreateSampleShape.cpp
 	src/CreateSimulationWorkspace.cpp
-	src/CropWorkspaceByMask.cpp
 	src/DefineGaugeVolume.cpp
 	src/DeleteTableRows.cpp
 	src/DetermineChunking.cpp
@@ -162,7 +161,6 @@ set ( INC_FILES
 	inc/MantidDataHandling/CreateModeratorModel.h
 	inc/MantidDataHandling/CreateSampleShape.h
 	inc/MantidDataHandling/CreateSimulationWorkspace.h
-	inc/MantidDataHandling/CropWorkspaceByMask.h
 	inc/MantidDataHandling/DefineGaugeVolume.h
 	inc/MantidDataHandling/DeleteTableRows.h
 	inc/MantidDataHandling/DetermineChunking.h
@@ -316,7 +314,6 @@ set ( TEST_FILES
 	CreateModeratorModelTest.h
 	CreateSampleShapeTest.h
 	CreateSimulationWorkspaceTest.h
-	CropWorkspaceByMaskTest.h
 	DefineGaugeVolumeTest.h
 	DeleteTableRowsTest.h
 	DetermineChunkingTest.h
diff --git a/Code/Mantid/docs/source/algorithms/CropWorkspaceByMask-v1.rst b/Code/Mantid/docs/source/algorithms/RemoveMaskedSpectra-v1.rst
similarity index 81%
rename from Code/Mantid/docs/source/algorithms/CropWorkspaceByMask-v1.rst
rename to Code/Mantid/docs/source/algorithms/RemoveMaskedSpectra-v1.rst
index 5e2638fc66ecc243511ee8745494f9fc284239cb..265bf191f53983798e06c79da31453e53949f765 100644
--- a/Code/Mantid/docs/source/algorithms/CropWorkspaceByMask-v1.rst
+++ b/Code/Mantid/docs/source/algorithms/RemoveMaskedSpectra-v1.rst
@@ -20,23 +20,23 @@ Usage
     autotestdata\UsageData and the following tag unindented
     .. include:: ../usagedata-note.txt
 
-**Example - CropWorkspaceByMask**
+**Example - RemoveMaskedSpectra**
 
-.. testcode:: CropWorkspaceByMaskExample
+.. testcode:: RemoveMaskedSpectraExample
 
    # Create a host workspace
    ws = CreateWorkspace(DataX=range(0,3), DataY=(0,2))
    or
    ws = CreateSampleWorkspace()
 
-   wsOut = CropWorkspaceByMask()
+   wsOut = RemoveMaskedSpectra()
 
    # Print the result
    print "The output workspace has %i spectra" % wsOut.getNumberHistograms()
 
 Output:
 
-.. testoutput:: CropWorkspaceByMaskExample
+.. testoutput:: RemoveMaskedSpectraExample
 
   The output workspace has ?? spectra