diff --git a/Code/Mantid/Build/CMake/FindPythonLibs.cmake b/Code/Mantid/Build/CMake/FindPythonLibs.cmake
index 91836f96b256fa2da31d4f9ca2bd080b0993642c..2dd0836fecf817fb7ffd5dcb377fd947b6402772 100644
--- a/Code/Mantid/Build/CMake/FindPythonLibs.cmake
+++ b/Code/Mantid/Build/CMake/FindPythonLibs.cmake
@@ -62,7 +62,7 @@ FOREACH(_CURRENT_VERSION 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
       [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs 
       [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug
       [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs 
-	  "${CMAKE_LIBRARY_PATH}/Python25")
+	  "${CMAKE_LIBRARY_PATH}/Python"${_CURRENT_VERSION_NO_DOTS})
   ENDIF(WIN32)
 
   FIND_LIBRARY(PYTHON_LIBRARY
diff --git a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/BinaryOperation.h b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/BinaryOperation.h
index b2b3b169ae6ff670eb0d7fc4f2742f1a37eeec92..0532125b355b0c9cf42aa89a0baf79d81d89ee32 100644
--- a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/BinaryOperation.h
+++ b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/BinaryOperation.h
@@ -113,7 +113,7 @@ namespace Mantid
       /// Checks if the spectra at the given index of either input workspace is masked. If so then the output spectra has zeroed data
       /// and is also masked. The function returns true if further processing is not required on the spectra.
       virtual bool propagateSpectraMask(const API::MatrixWorkspace_const_sptr lhs,const API::MatrixWorkspace_const_sptr rhs, 
-					const int index, API::MatrixWorkspace_sptr out);
+                                        const int index, API::MatrixWorkspace_sptr out);
 
       /** Carries out the binary operation on a single spectrum, with another spectrum as the right-hand operand.
        *
@@ -139,7 +139,7 @@ namespace Mantid
        *  @param EOut :: The vector to hold the error values resulting from the operation
        */
       virtual void performBinaryOperation(const MantidVec& lhsX, const MantidVec& lhsY, const MantidVec& lhsE,
-                                          const double& rhsY, const double& rhsE, MantidVec& YOut, MantidVec& EOut) = 0;
+                                          const double rhsY, const double rhsE, MantidVec& YOut, MantidVec& EOut) = 0;
 
 
       // ===================================== EVENT LIST BINARY OPERATIONS ==========================================
diff --git a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/Divide.h b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/Divide.h
index 98ae53c4f90befa4252602d0de8193b9249a8433..3ab99feeeddd53a7d0f67651dd1b6cced643b185 100644
--- a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/Divide.h
+++ b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/Divide.h
@@ -63,7 +63,7 @@ namespace Mantid
       void performBinaryOperation(const MantidVec& lhsX, const MantidVec& lhsY, const MantidVec& lhsE,
                                   const MantidVec& rhsY, const MantidVec& rhsE, MantidVec& YOut, MantidVec& EOut);
       void performBinaryOperation(const MantidVec& lhsX, const MantidVec& lhsY, const MantidVec& lhsE,
-                                  const double& rhsY, const double& rhsE, MantidVec& YOut, MantidVec& EOut);
+                                  const double rhsY, const double rhsE, MantidVec& YOut, MantidVec& EOut);
       void setOutputUnits(const API::MatrixWorkspace_const_sptr lhs,const API::MatrixWorkspace_const_sptr rhs,API::MatrixWorkspace_sptr out);
 
 
diff --git a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/Minus.h b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/Minus.h
index b90fabf8629e99025b02317a99a57d3d5d4bda36..3466a40d60da555101cd72f9c36280a1514cfc43 100644
--- a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/Minus.h
+++ b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/Minus.h
@@ -63,7 +63,7 @@ namespace Mantid
       void performBinaryOperation(const MantidVec& lhsX, const MantidVec& lhsY, const MantidVec& lhsE,
                                   const MantidVec& rhsY, const MantidVec& rhsE, MantidVec& YOut, MantidVec& EOut);
       void performBinaryOperation(const MantidVec& lhsX, const MantidVec& lhsY, const MantidVec& lhsE,
-                                  const double& rhsY, const double& rhsE, MantidVec& YOut, MantidVec& EOut);
+                                  const double rhsY, const double rhsE, MantidVec& YOut, MantidVec& EOut);
       void performEventBinaryOperation(DataObjects::EventList & lhs, const DataObjects::EventList & rhs);
       void performEventBinaryOperation(DataObjects::EventList & lhs, const MantidVec& rhsX, const MantidVec& rhsY, const MantidVec& rhsE);
       void performEventBinaryOperation(DataObjects::EventList & lhs, const double& rhsY, const double& rhsE);
diff --git a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/Multiply.h b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/Multiply.h
index 22876ace986311d48c6463504b408e9985669c46..62a98f3c6d70b5be517f8364b900de0b70edd47d 100644
--- a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/Multiply.h
+++ b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/Multiply.h
@@ -63,7 +63,7 @@ namespace Mantid
       void performBinaryOperation(const MantidVec& lhsX, const MantidVec& lhsY, const MantidVec& lhsE,
                                   const MantidVec& rhsY, const MantidVec& rhsE, MantidVec& YOut, MantidVec& EOut);
       void performBinaryOperation(const MantidVec& lhsX, const MantidVec& lhsY, const MantidVec& lhsE,
-                                  const double& rhsY, const double& rhsE, MantidVec& YOut, MantidVec& EOut);
+                                  const double rhsY, const double rhsE, MantidVec& YOut, MantidVec& EOut);
 
       virtual void performEventBinaryOperation(DataObjects::EventList & lhs,
           const DataObjects::EventList & rhs);
diff --git a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/Plus.h b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/Plus.h
index 1f481cc41ed2536fe9563061a078192dee4881fc..dcb2eff5aeb1f727132ba87ea02fb5201c28e88e 100644
--- a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/Plus.h
+++ b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/Plus.h
@@ -65,7 +65,7 @@ namespace Mantid
       void performBinaryOperation(const MantidVec& lhsX, const MantidVec& lhsY, const MantidVec& lhsE,
                                   const MantidVec& rhsY, const MantidVec& rhsE, MantidVec& YOut, MantidVec& EOut);
       void performBinaryOperation(const MantidVec& lhsX, const MantidVec& lhsY, const MantidVec& lhsE,
-                                  const double& rhsY, const double& rhsE, MantidVec& YOut, MantidVec& EOut);
+                                  const double rhsY, const double rhsE, MantidVec& YOut, MantidVec& EOut);
       void performEventBinaryOperation(DataObjects::EventList & lhs, const DataObjects::EventList & rhs);
       void performEventBinaryOperation(DataObjects::EventList & lhs, const MantidVec& rhsX, const MantidVec& rhsY, const MantidVec& rhsE);
       void performEventBinaryOperation(DataObjects::EventList & lhs, const double& rhsY, const double& rhsE);
diff --git a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/PoissonErrors.h b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/PoissonErrors.h
index dd44b0bd84d7d7a491dde3453a0e38a3fc28036a..cf89c91f9351562c7ab13cd7ab1f7515a8d462eb 100644
--- a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/PoissonErrors.h
+++ b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/PoissonErrors.h
@@ -65,7 +65,7 @@ private:
   void performBinaryOperation(const MantidVec& lhsX, const MantidVec& lhsY, const MantidVec& lhsE,
                               const MantidVec& rhsY, const MantidVec& rhsE, MantidVec& YOut, MantidVec& EOut);
   void performBinaryOperation(const MantidVec& lhsX, const MantidVec& lhsY, const MantidVec& lhsE,
-                              const double& rhsY, const double& rhsE, MantidVec& YOut, MantidVec& EOut);
+                              const double rhsY, const double rhsE, MantidVec& YOut, MantidVec& EOut);
   virtual bool checkSizeCompatibility(const API::MatrixWorkspace_const_sptr lhs,const API::MatrixWorkspace_const_sptr rhs) const;
   
   /// The name of the first input workspace property for BinaryOperation
diff --git a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/WeightedMean.h b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/WeightedMean.h
index 45d66c71d4622c58df6e8af8017e4f197e2e51eb..c50b1f945f762ad4be78e8d255d082be12a5bbf4 100644
--- a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/WeightedMean.h
+++ b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/WeightedMean.h
@@ -60,7 +60,7 @@ private:
   void performBinaryOperation(const MantidVec& lhsX, const MantidVec& lhsY, const MantidVec& lhsE,
                               const MantidVec& rhsY, const MantidVec& rhsE, MantidVec& YOut, MantidVec& EOut);
   void performBinaryOperation(const MantidVec& lhsX, const MantidVec& lhsY, const MantidVec& lhsE,
-                              const double& rhsY, const double& rhsE, MantidVec& YOut, MantidVec& EOut);
+                              const double rhsY, const double rhsE, MantidVec& YOut, MantidVec& EOut);
   virtual bool checkCompatibility(const API::MatrixWorkspace_const_sptr lhs,const API::MatrixWorkspace_const_sptr rhs) const;
   virtual bool checkSizeCompatibility(const API::MatrixWorkspace_const_sptr lhs,const API::MatrixWorkspace_const_sptr rhs) const;
 
diff --git a/Code/Mantid/Framework/Algorithms/src/BinaryOperation.cpp b/Code/Mantid/Framework/Algorithms/src/BinaryOperation.cpp
index 044bab5f2aa2e9d25e80c9ebe227b5e9db908e25..8c6e3dfb6ff27887ceadc9e62fd275d1b35c5f26 100644
--- a/Code/Mantid/Framework/Algorithms/src/BinaryOperation.cpp
+++ b/Code/Mantid/Framework/Algorithms/src/BinaryOperation.cpp
@@ -369,6 +369,14 @@ namespace Mantid
     }
 
     //--------------------------------------------------------------------------------------------
+    // Disable optimization under the Visual Studio compiler
+    // Optimizing, in combination with openmp parallelization causes occasional miscalculations
+    // Re-enabled below, after the doSingleValue, doSingleSpectrum, doSingleColumn & do2D methods
+    #ifdef _WIN32
+      #pragma optimize( "", off )
+      #pragma warning(disable:4748)  // This is about /Gs being irrelevant when not optimizing
+    #endif
+
     /**
      * Called when the rhs operand is a single value.
      *  Loops over the lhs workspace calling the abstract binary operation function with a single number as the rhs operand.
@@ -701,40 +709,14 @@ namespace Mantid
         m_erhs->clearMRU();
     }
 
-
-
-
-
-//
-//
-//
-//
-//
-//    void BinaryOperation::do2D()
-//    {
-//      // Propagate any masking first or it could mess up the numbers
-//      propagateBinMasks(m_rhs,m_out);
-//      // Loop over the spectra calling the virtual function for each one
-//      const int numHists = m_lhs->getNumberHistograms();
-//      PARALLEL_FOR3(m_lhs,m_rhs,m_out)
-//      for (int i = 0; i < numHists; ++i)
-//      {
-//        PARALLEL_START_INTERUPT_REGION
-//        m_out->setX(i,m_lhs->refX(i));
-//        if( propagateSpectraMask(m_lhs, m_rhs, i, m_out) )
-//        {
-//          performBinaryOperation(m_lhs->readX(i),m_lhs->readY(i),m_lhs->readE(i),m_rhs->readY(i),m_rhs->readE(i),m_out->dataY(i),m_out->dataE(i));
-//        }
-//        m_progress->report();
-//        PARALLEL_END_INTERUPT_REGION
-//      }
-//      PARALLEL_CHECK_INTERUPT_REGION
-//    }
-//
-
-
+    // End of optimization disabling under Visual Studio
+    #ifdef _WIN32
+      #pragma optimize( "", on )
+      #pragma warning(default:4748)
+    #endif
 
     //---------------------------------------------------------------------------------------------
+
     /** Copies any bin masking from the smaller/rhs input workspace to the output.
      *  Masks on the other input workspace are copied automatically by the workspace factory.
      *  @param rhs :: The workspace which is the right hand operand
diff --git a/Code/Mantid/Framework/Algorithms/src/Divide.cpp b/Code/Mantid/Framework/Algorithms/src/Divide.cpp
index 7bc9da144dc5526661bc6d7521840a226156710e..13590ede5c99e8246afb47e44f5e38743c01e6b2 100644
--- a/Code/Mantid/Framework/Algorithms/src/Divide.cpp
+++ b/Code/Mantid/Framework/Algorithms/src/Divide.cpp
@@ -48,7 +48,7 @@ namespace Mantid
     }
 
     void Divide::performBinaryOperation(const MantidVec& lhsX, const MantidVec& lhsY, const MantidVec& lhsE,
-                                       const double& rhsY, const double& rhsE, MantidVec& YOut, MantidVec& EOut)
+                                        const double rhsY, const double rhsE, MantidVec& YOut, MantidVec& EOut)
     {
       (void) lhsX; //Avoid compiler warning
       // Do the right-hand part of the error calculation just once
diff --git a/Code/Mantid/Framework/Algorithms/src/Minus.cpp b/Code/Mantid/Framework/Algorithms/src/Minus.cpp
index 541054c361e67070c5e66ce8b8445b67d679bcbb..0b8c15132fcc66dbb349b75e56bcb11b195b4557 100644
--- a/Code/Mantid/Framework/Algorithms/src/Minus.cpp
+++ b/Code/Mantid/Framework/Algorithms/src/Minus.cpp
@@ -31,7 +31,7 @@ namespace Mantid
     }
 
     void Minus::performBinaryOperation(const MantidVec& lhsX, const MantidVec& lhsY, const MantidVec& lhsE,
-                                       const double& rhsY, const double& rhsE, MantidVec& YOut, MantidVec& EOut)
+                                       const double rhsY, const double rhsE, MantidVec& YOut, MantidVec& EOut)
     {
       (void) lhsX; //Avoid compiler warning
       std::transform(lhsY.begin(),lhsY.end(),YOut.begin(),std::bind2nd(std::minus<double>(),rhsY));
diff --git a/Code/Mantid/Framework/Algorithms/src/Multiply.cpp b/Code/Mantid/Framework/Algorithms/src/Multiply.cpp
index ae2bd237c40a38a326e3c372f8eba41ecc78cb23..aaddb856367827bb3119d9d1395e0db5e6bafea7 100644
--- a/Code/Mantid/Framework/Algorithms/src/Multiply.cpp
+++ b/Code/Mantid/Framework/Algorithms/src/Multiply.cpp
@@ -46,7 +46,7 @@ namespace Mantid
     }
 
     void Multiply::performBinaryOperation(const MantidVec& lhsX, const MantidVec& lhsY, const MantidVec& lhsE,
-                                          const double& rhsY, const double& rhsE, MantidVec& YOut, MantidVec& EOut)
+                                          const double rhsY, const double rhsE, MantidVec& YOut, MantidVec& EOut)
     {
       (void) lhsX; //Avoid compiler warning
       const int bins = lhsE.size();
diff --git a/Code/Mantid/Framework/Algorithms/src/Plus.cpp b/Code/Mantid/Framework/Algorithms/src/Plus.cpp
index 7026467c29e96c12cecdaef115740c4e3b6050d0..c2ed39c6718b234e5632261e1354f7915b31a4f3 100644
--- a/Code/Mantid/Framework/Algorithms/src/Plus.cpp
+++ b/Code/Mantid/Framework/Algorithms/src/Plus.cpp
@@ -35,7 +35,7 @@ namespace Mantid
 
     //---------------------------------------------------------------------------------------------
     void Plus::performBinaryOperation(const MantidVec& lhsX, const MantidVec& lhsY, const MantidVec& lhsE,
-                                       const double& rhsY, const double& rhsE, MantidVec& YOut, MantidVec& EOut)
+                                       const double rhsY, const double rhsE, MantidVec& YOut, MantidVec& EOut)
     {
       (void) lhsX; //Avoid compiler warning
       std::transform(lhsY.begin(),lhsY.end(),YOut.begin(),std::bind2nd(std::plus<double>(),rhsY));
diff --git a/Code/Mantid/Framework/Algorithms/src/PoissonErrors.cpp b/Code/Mantid/Framework/Algorithms/src/PoissonErrors.cpp
index 77e2fc9f9244eee905f99eb7b84c708bcfae7174..8c3993560abc244794d978b0a1411a5dd15c00e7 100644
--- a/Code/Mantid/Framework/Algorithms/src/PoissonErrors.cpp
+++ b/Code/Mantid/Framework/Algorithms/src/PoissonErrors.cpp
@@ -49,7 +49,7 @@ namespace Mantid
     }
     
     void PoissonErrors::performBinaryOperation(const MantidVec& lhsX, const MantidVec& lhsY, const MantidVec& lhsE,
-                                               const double& rhsY, const double& rhsE, MantidVec& YOut, MantidVec& EOut)
+                                               const double rhsY, const double rhsE, MantidVec& YOut, MantidVec& EOut)
     {
       (void) lhsE; (void) lhsX; //Avoid compiler warning
 
diff --git a/Code/Mantid/Framework/Algorithms/src/WeightedMean.cpp b/Code/Mantid/Framework/Algorithms/src/WeightedMean.cpp
index 5dd73e0ac2d59da141a6a452f000f0926c531ef1..66f203ad72662f6f56a140658417585e3d582907 100644
--- a/Code/Mantid/Framework/Algorithms/src/WeightedMean.cpp
+++ b/Code/Mantid/Framework/Algorithms/src/WeightedMean.cpp
@@ -79,7 +79,7 @@ void WeightedMean::performBinaryOperation(const MantidVec& lhsX, const MantidVec
 }
 
 void WeightedMean::performBinaryOperation(const MantidVec& lhsX, const MantidVec& lhsY, const MantidVec& lhsE,
-                                          const double& rhsY, const double& rhsE, MantidVec& YOut, MantidVec& EOut)
+                                          const double rhsY, const double rhsE, MantidVec& YOut, MantidVec& EOut)
 {
   assert( lhsX.size() == 1 );
   // If we get here we've got two single column workspaces so it's easy.
diff --git a/Code/Mantid/Framework/Algorithms/test/BinaryOperationTest.h b/Code/Mantid/Framework/Algorithms/test/BinaryOperationTest.h
index 7c4b57f47c5283bdfdbfd15be92d41a49c6fe9ea..58aa5517abb6c24bc71c6d5ae2c4e0aa71b71e58 100644
--- a/Code/Mantid/Framework/Algorithms/test/BinaryOperationTest.h
+++ b/Code/Mantid/Framework/Algorithms/test/BinaryOperationTest.h
@@ -50,7 +50,7 @@ private:
       const Mantid::MantidVec&, const Mantid::MantidVec& , Mantid::MantidVec&, Mantid::MantidVec&)
   {}
   void performBinaryOperation(const Mantid::MantidVec& , const Mantid::MantidVec&, const Mantid::MantidVec&,
-      const double& , const double&, Mantid::MantidVec& , Mantid::MantidVec& )
+      const double , const double, Mantid::MantidVec& , Mantid::MantidVec& )
   {}
 };
 
diff --git a/Code/Mantid/Framework/Algorithms/test/CommutativeBinaryOperationTest.h b/Code/Mantid/Framework/Algorithms/test/CommutativeBinaryOperationTest.h
index 0a547cdf4f45f2821de3050fdb48e94afe0672a1..38da5f71961fd9c1bd67990a5f94428dc619ef66 100644
--- a/Code/Mantid/Framework/Algorithms/test/CommutativeBinaryOperationTest.h
+++ b/Code/Mantid/Framework/Algorithms/test/CommutativeBinaryOperationTest.h
@@ -35,7 +35,7 @@ private:
                               const MantidVec& rhsY, const MantidVec& rhsE, MantidVec& YOut, MantidVec& EOut)
   {}
   void performBinaryOperation(const MantidVec& lhsX, const MantidVec& lhsY, const MantidVec& lhsE,
-                              const double& rhsY, const double& rhsE, MantidVec& YOut, MantidVec& EOut)
+                              const double rhsY, const double rhsE, MantidVec& YOut, MantidVec& EOut)
   {}
 };
 
diff --git a/Code/Mantid/Framework/Algorithms/test/DivideTest.h b/Code/Mantid/Framework/Algorithms/test/DivideTest.h
index 62e89cf42bc68932d0f5ae4dd6c6e4689931f91d..f29b0c6e3e265f16b2bffb3f0171d83621ec8468 100644
--- a/Code/Mantid/Framework/Algorithms/test/DivideTest.h
+++ b/Code/Mantid/Framework/Algorithms/test/DivideTest.h
@@ -816,14 +816,16 @@ public:
       {
         for (int i=0; i<work_out1->blocksize(); i++)
         {
-          std::ostringstream mess;
-          mess << message << ", evaluated at wi " << wi << ", i " << i;
+          //std::ostringstream mess;
+          //mess << message << ", evaluated at wi " << wi << ", i " << i;
         
           TS_ASSERT_DELTA(work_in1->readX(wi)[i], work_out1->readX(wi)[i], 0.0001);
           double sig3 = work_out1->readY(wi)[i];
           double err3 = work_out1->readE(wi)[i];
-          TSM_ASSERT_DELTA(mess.str(), sig3, expectedValue, 0.0001);
-          TSM_ASSERT_DELTA(mess.str(), err3, expectedError, 0.0001);
+          TS_ASSERT_DELTA(sig3, expectedValue, 0.0001);
+          TS_ASSERT_DELTA(err3, expectedError, 0.0001);
+          //TSM_ASSERT_DELTA(mess.str(), sig3, expectedValue, 0.0001);
+          //TSM_ASSERT_DELTA(mess.str(), err3, expectedError, 0.0001);
           if (fabs(err3 - expectedError) > 0.001)
           {
             breakOut=true;