diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h
index aab57b03aa45826eccb8e7e88f8ee407a6c5f1e7..b4b3705ecfe8cc449df2e9eab2498165211cb371 100644
--- a/source/App/EncoderApp/EncAppCfg.h
+++ b/source/App/EncoderApp/EncAppCfg.h
@@ -554,7 +554,7 @@ protected:
   std::string m_decodeBitstreams[2];                          ///< filename for decode bitstreams.
 #if JVET_M0055_DEBUG_CTU
   int         m_debugCTU;
-#endif  
+#endif
   int         m_switchPOC;                                    ///< dbg poc.
   int         m_switchDQP;                                    ///< switch DQP.
   int         m_fastForwardToPOC;                             ///< get to encoding the specified POC as soon as possible by skipping temporal layers irrelevant for the specified POC
diff --git a/source/Lib/CommonLib/LoopFilter.h b/source/Lib/CommonLib/LoopFilter.h
index 88907e1d147c725acfe9f66793900e4f7fd5e03e..2b6a81f42da40da575d8570dacf51d4f228656a7 100644
--- a/source/Lib/CommonLib/LoopFilter.h
+++ b/source/Lib/CommonLib/LoopFilter.h
@@ -67,7 +67,7 @@ private:
   /// CU-level deblocking function
   void xDeblockCU                 (       CodingUnit& cu, const DeblockEdgeDir edgeDir );
 #endif
-  
+
   // set / get functions
   void xSetLoopfilterParam        ( const CodingUnit& cu );
 
diff --git a/source/Lib/CommonLib/Slice.h b/source/Lib/CommonLib/Slice.h
index d5fbebce5441dce146261ef98004b8d7d25ea6ff..ffe92ca71fd05e343df8125d262612e6a2351c46 100644
--- a/source/Lib/CommonLib/Slice.h
+++ b/source/Lib/CommonLib/Slice.h
@@ -990,7 +990,7 @@ private:
   int               m_LadfQpOffset[MAX_LADF_INTERVALS];
   int               m_LadfIntervalLowerBound[MAX_LADF_INTERVALS];
 #endif
-  
+
 #if !JVET_M0483_IBC
   unsigned    m_IBCMode;
 #endif
@@ -1249,7 +1249,7 @@ public:
   void                    setMaxSbtSize( uint8_t val )                                                    { m_MaxSbtSize = val; }
   uint8_t                 getMaxSbtSize() const                                                           { return m_MaxSbtSize; }
 #endif
-  
+
   void      setAMVREnabledFlag    ( bool b )                                        { m_AMVREnabledFlag = b; }
   bool      getAMVREnabledFlag    ()                                      const     { return m_AMVREnabledFlag; }
   void      setUseAffine          ( bool b )                                        { m_Affine = b; }
@@ -1294,7 +1294,7 @@ public:
   void      setLadfIntervalLowerBound( int value, int idx )                         { m_LadfIntervalLowerBound[ idx ] = value; }
   int       getLadfIntervalLowerBound( int idx )                          const     { return m_LadfIntervalLowerBound[ idx ]; }
 #endif
- 
+
   void      setUseMHIntra         ( bool b )                                        { m_MHIntra = b; }
   bool      getUseMHIntra         ()                                      const     { return m_MHIntra; }
   void      setUseTriangle        ( bool b )                                        { m_Triangle = b; }
diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h
index 552d3179f0aa0ee81f756ce48fb4260070e416b1..6c591033bf365a4da7343a2afcbdf4ecda1562be 100644
--- a/source/Lib/CommonLib/TypeDef.h
+++ b/source/Lib/CommonLib/TypeDef.h
@@ -52,9 +52,9 @@
 
 #define JCTVC_Y0038_PARAMS                                1
 
-#define JVET_M0600_RATE_CTRL                              1 //frame level bit allocation by qdf 
+#define JVET_M0600_RATE_CTRL                              1 //frame level bit allocation by qdf
 
-#define JVET_M0451_INTEROPERABILITY_POINT_SYNTAX          1 
+#define JVET_M0451_INTEROPERABILITY_POINT_SYNTAX          1
 
 #define JVET_M0428_ENC_DB_OPT                             1 // Encoder optimization with deblocking filter
 
diff --git a/source/Lib/CommonLib/x86/AdaptiveLoopFilterX86.h b/source/Lib/CommonLib/x86/AdaptiveLoopFilterX86.h
index 6cdcb0e8c14c0c157110e6fc6959f2ab7813c643..328f0ab0807fe57e2c4de6ca26704ec347c4a881 100644
--- a/source/Lib/CommonLib/x86/AdaptiveLoopFilterX86.h
+++ b/source/Lib/CommonLib/x86/AdaptiveLoopFilterX86.h
@@ -563,7 +563,7 @@ template<X86_VEXT vext>
 static void simdFilter7x7Blk( AlfClassifier** classifier, const PelUnitBuf &recDst, const CPelUnitBuf& recSrc, const Area& blk, const ComponentID compId, short* filterSet, const ClpRng& clpRng, CodingStructure& cs )
 #else
 static void simdFilter7x7Blk( AlfClassifier** classifier, const PelUnitBuf &recDst, const CPelUnitBuf& recSrc, const Area& blk, const ComponentID compId, short* filterSet, const ClpRng& clpRng )
-#endif 
+#endif
 {
   static const unsigned char mask0[16] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 6, 7, 4, 5, 2, 3 };
   static const unsigned char mask00[16] = { 2, 3, 0, 1, 0, 0, 0, 0, 8, 9, 0, 0, 0, 0, 0, 1 };
diff --git a/source/Lib/DecoderLib/DecCu.cpp b/source/Lib/DecoderLib/DecCu.cpp
index cd3f1cc8a5ebd638c26ee9d8871e689dd25689e7..723ccb3dce81f83f8625567717bd644f5bf7eccb 100644
--- a/source/Lib/DecoderLib/DecCu.cpp
+++ b/source/Lib/DecoderLib/DecCu.cpp
@@ -805,7 +805,7 @@ void DecCu::xDeriveCUMV( CodingUnit &cu )
               //    Mv mv[3];
               CHECK( pu.refIdx[eRefList] < 0, "Unexpected negative refIdx." );
 #if JVET_M0246_AFFINE_AMVR
-#if !JVET_M0055_DEBUG_CTU 
+#if !JVET_M0055_DEBUG_CTU
               Mv tmpMvd[3];
               memcpy( tmpMvd, pu.mvdAffi[eRefList], 3 * sizeof( Mv ) );
 #endif
@@ -835,7 +835,7 @@ void DecCu::xDeriveCUMV( CodingUnit &cu )
               }
 #if !JVET_M0055_DEBUG_CTU //th this leads to different interpretation of mvdAffi at encoder and decoder
               memcpy( pu.mvdAffi[eRefList], tmpMvd, 3 * sizeof( Mv ) );
-#endif 
+#endif
 #else
               Mv mvLT = affineAMVPInfo.mvCandLT[mvp_idx] + pu.mvdAffi[eRefList][0];
               Mv mvRT = affineAMVPInfo.mvCandRT[mvp_idx] + pu.mvdAffi[eRefList][1];
diff --git a/source/Lib/DecoderLib/DecSlice.cpp b/source/Lib/DecoderLib/DecSlice.cpp
index 13be91a5c29412727f28774ed1a5f21893f29a8c..5e12acbcfcc5ef91dfe4c63995acfb24eada8ac4 100644
--- a/source/Lib/DecoderLib/DecSlice.cpp
+++ b/source/Lib/DecoderLib/DecSlice.cpp
@@ -70,7 +70,7 @@ void DecSlice::init( CABACDecoder* cabacDecoder, DecCu* pcCuDecoder )
   m_pcCuDecoder     = pcCuDecoder;
 }
 
-#if JVET_M0055_DEBUG_CTU 
+#if JVET_M0055_DEBUG_CTU
 void DecSlice::decompressSlice( Slice* slice, InputBitstream* bitstream, int debugCTU )
 #else
 void DecSlice::decompressSlice( Slice* slice, InputBitstream* bitstream )
@@ -235,8 +235,8 @@ void DecSlice::decompressSlice( Slice* slice, InputBitstream* bitstream )
       cs.slice->resetMotionLUTs();
     }
 
-#if JVET_M0055_DEBUG_CTU 
- 
+#if JVET_M0055_DEBUG_CTU
+
     if( ctuRsAddr == debugCTU )
     {
       isLastCtuOfSliceSegment = true; // get out here
diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp
index 74a2b2b807473781839b7543bea0cc621e41f4f9..c7bc728c4b8fa1a750cb668b12a558a301a1757d 100644
--- a/source/Lib/DecoderLib/VLCReader.cpp
+++ b/source/Lib/DecoderLib/VLCReader.cpp
@@ -1104,7 +1104,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS)
 #if JVET_M0427_INLOOP_RESHAPER
   READ_FLAG(uiCode, "sps_reshaper_enable_flag");                   pcSPS->setUseReshaper(uiCode == 1);
 #endif
-  
+
 #if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET
   READ_FLAG( uiCode, "sps_ladf_enabled_flag" );                     pcSPS->setLadfEnabled( uiCode != 0 );
   if ( pcSPS->getLadfEnabled() )
@@ -1120,7 +1120,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS)
     }
   }
 #endif
- 
+
   // KJS: reference picture sets to be replaced
   READ_UVLC( uiCode, "num_short_term_ref_pic_sets" );
   CHECK(uiCode > 64, "Invalid code");
diff --git a/source/Lib/EncoderLib/EncCu.cpp b/source/Lib/EncoderLib/EncCu.cpp
index 6420578a33071810b92ba2fcd9a9bf95d6b86b67..55fdef4db785a19724d8f19190f8feaad6950448 100644
--- a/source/Lib/EncoderLib/EncCu.cpp
+++ b/source/Lib/EncoderLib/EncCu.cpp
@@ -4403,7 +4403,7 @@ void EncCu::xCalDebCost( CodingStructure &cs, Partitioner &partitioner, bool cal
       {
         const CompArea&  compArea = areaLeft.block(compId);
         picDbBuf.getBuf( compArea ).copyFrom( cs.picture->getRecoBuf( compArea ) );
-#if JVET_M0427_INLOOP_RESHAPER       
+#if JVET_M0427_INLOOP_RESHAPER
         if ( cs.slice->getReshapeInfo().getUseSliceReshaper() && m_pcReshape->getSliceReshaperInfo().getUseSliceReshaper() && isLuma( compId ) )
         {
           picDbBuf.getBuf( compArea ).rspSignal( m_pcReshape->getInvLUT() );
diff --git a/source/Lib/EncoderLib/EncGOP.cpp b/source/Lib/EncoderLib/EncGOP.cpp
index ac8c86733e9db51ca1bba061205dd6e743214b77..07a16bf9611d3a83eeb3fdc5c2bbea18f1ef195d 100644
--- a/source/Lib/EncoderLib/EncGOP.cpp
+++ b/source/Lib/EncoderLib/EncGOP.cpp
@@ -2519,7 +2519,7 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic,
         m_pcEncLib->setParamSetChanged(pcSlice->getSPS()->getSPSId(), pcSlice->getPPS()->getPPSId());
       }
       actualTotalBits += xWriteParameterSets(accessUnit, pcSlice, writePS);
-      
+
       if (writePS)
 #else
       actualTotalBits += xWriteParameterSets( accessUnit, pcSlice, m_bSeqFirst );
diff --git a/source/Lib/EncoderLib/IntraSearch.cpp b/source/Lib/EncoderLib/IntraSearch.cpp
index 5a13ff665b2b3b2e4c32d42233b7552137ddf575..8e1e8cb6493a7bb08711ed8e2c0c7dc11526d9c8 100644
--- a/source/Lib/EncoderLib/IntraSearch.cpp
+++ b/source/Lib/EncoderLib/IntraSearch.cpp
@@ -777,7 +777,7 @@ void IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner )
       {
         uiRdModeList.resize( std::min<size_t>( uiRdModeList.size(), 2 ) );
 #if JVET_M0102_INTRA_SUBPARTITIONS
-        extendRefList.resize( std::min<size_t>( extendRefList.size(), 2 ) ); 
+        extendRefList.resize( std::min<size_t>( extendRefList.size(), 2 ) );
         if( nOptionsForISP > 1 )
         {
           m_rdModeListWithoutMrlHor.resize( std::min<size_t>( m_rdModeListWithoutMrlHor.size(), 2 ) );
@@ -834,8 +834,8 @@ void IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner )
         uiRdModeList.insert( uiRdModeList.begin() + 1, secondIspList->begin(), secondIspList->end() );
         uiRdModeList.insert( uiRdModeList.begin() + 1, firstIspList->begin() , firstIspList->end()  );
 
-        extendRefList.insert( extendRefList.begin() + 1, secondIspList->size(), MRL_NUM_REF_LINES + ispOptions[2] ); 
-        extendRefList.insert( extendRefList.begin() + 1, firstIspList->size() , MRL_NUM_REF_LINES + ispOptions[1] ); 
+        extendRefList.insert( extendRefList.begin() + 1, secondIspList->size(), MRL_NUM_REF_LINES + ispOptions[2] );
+        extendRefList.insert( extendRefList.begin() + 1, firstIspList->size() , MRL_NUM_REF_LINES + ispOptions[1] );
       }
       else
       {
diff --git a/source/Lib/EncoderLib/RateCtrl.h b/source/Lib/EncoderLib/RateCtrl.h
index e67e55ebfd02ca52de9fc59ed3ccd2e06eb33dc5..3b3e2a1b1ca10f8f14655fe47ba8d438cd470348 100644
--- a/source/Lib/EncoderLib/RateCtrl.h
+++ b/source/Lib/EncoderLib/RateCtrl.h
@@ -94,7 +94,7 @@ struct TRCParameter
   double m_beta;
   int    m_validPix;
 #if JVET_M0600_RATE_CTRL
-  double m_skipRatio; 
+  double m_skipRatio;
 #endif
 };
 
diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp
index b8fa51fdbb24f9362543061f2b55b62fc6280121..e28d975da3553ebe0de3d39031ab4750dc348b75 100644
--- a/source/Lib/EncoderLib/VLCWriter.cpp
+++ b/source/Lib/EncoderLib/VLCWriter.cpp
@@ -631,7 +631,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS )
   }
 
   WRITE_UVLC( pcSPS->getBitDepth(CHANNEL_TYPE_LUMA) - 8,                      "bit_depth_luma_minus8" );
-  
+
   const bool         chromaEnabled         = isChromaEnabled(format);
   WRITE_UVLC( chromaEnabled ? (pcSPS->getBitDepth(CHANNEL_TYPE_CHROMA) - 8):0,  "bit_depth_chroma_minus8" );
 
@@ -679,7 +679,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS )
       WRITE_UVLC(g_aucLog2[pcSPS->getMaxTTSizeIChroma()] - g_aucLog2[pcSPS->getMinQTSize(I_SLICE, CHANNEL_TYPE_CHROMA)], "sps_log2_diff_max_tt_min_qt_intra_tile_group_chroma");
     }
   }
-  
+
   // KJS: does not exist anymore -> remove?
   WRITE_UVLC( pcSPS->getQuadtreeTULog2MinSize() - 2,                                 "log2_min_luma_transform_block_size_minus2" );
     WRITE_UVLC( pcSPS->getQuadtreeTULog2MaxSize() - pcSPS->getQuadtreeTULog2MinSize(), "log2_diff_max_min_luma_transform_block_size" );
@@ -761,7 +761,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS )
 
   // KJS: sps_ciip_enabled_flag
   WRITE_FLAG( pcSPS->getUseMHIntra() ? 1 : 0,                                                  "mhintra_flag" );
-  
+
   WRITE_FLAG( pcSPS->getUseTriangle() ? 1: 0,                                                  "triangle_flag" );
 
   // KJS: not in draft yet
@@ -780,7 +780,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS )
 #if JVET_M0427_INLOOP_RESHAPER
   WRITE_FLAG(pcSPS->getUseReshaper() ? 1 : 0, "sps_reshaper_enable_flag");
 #endif
-  
+
 #if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET
   WRITE_FLAG( pcSPS->getLadfEnabled() ? 1 : 0,                                                 "sps_ladf_enabled_flag" );
   if ( pcSPS->getLadfEnabled() )
@@ -832,7 +832,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS )
     }
   }
 #endif
-  
+
   // KJS: no VUI defined yet
   WRITE_FLAG( pcSPS->getVuiParametersPresentFlag(),            "vui_parameters_present_flag" );
   if (pcSPS->getVuiParametersPresentFlag())