diff --git a/modelling/doc/pipeline.rst b/modelling/doc/pipeline.rst
index 2db3864dc6da48ea948fa071c816989e3f3dd36b..7ae07b4858f1f77c96592261aee018e11de06b58 100644
--- a/modelling/doc/pipeline.rst
+++ b/modelling/doc/pipeline.rst
@@ -69,7 +69,7 @@ Build Raw Modelling Handle
     better by the convenient function :func:`SetSequenceProfiles`, 
     to ensure consistency with the seqres.
 
-  .. attribute:: psipred_prediction
+  .. attribute:: psipred_predictions
 
     List of predictions with one :class:`promod3.loop.PsipredPrediction` for 
     each chain of target protein. 
diff --git a/modelling/pymod/_closegaps.py b/modelling/pymod/_closegaps.py
index bb8bdc0ab85533a4428f222d265f3ac49d01b1c3..dde6c8d7adb5f9dd35e948a93373662a50d022a0 100644
--- a/modelling/pymod/_closegaps.py
+++ b/modelling/pymod/_closegaps.py
@@ -1162,7 +1162,7 @@ def FillLoopsByMonteCarlo(mhandle, torsion_sampler, max_loops_to_search=6,
 
 
 def CloseGaps(mhandle, merge_distance=4, fragment_db=None, structure_db=None, 
-              torsion_sampler=None, chain_idx = None, resnum_range = None):
+              torsion_sampler=None, chain_idx=None, resnum_range=None):
     '''
     Tries to close all gaps in a model, except termini. It will go through
     following steps:
diff --git a/modelling/pymod/_pipeline.py b/modelling/pymod/_pipeline.py
index efc8c81c73291d7422869b2e30f8696ffc0cc264..006ab4abd682c2d607598418570266c932f56db5 100644
--- a/modelling/pymod/_pipeline.py
+++ b/modelling/pymod/_pipeline.py
@@ -406,7 +406,7 @@ def CheckFinalModel(mhandle):
             ost.LogInfo("Stereo-chemical problem in sidechain " + \
                         "of residue " + str(res))
 
-def BuildFromRawModel(mhandle, alternative_mhandles = None, 
+def BuildFromRawModel(mhandle, alternative_mhandles=None,
                       use_amber_ff=False, extra_force_fields=list()):
     '''Build a model starting with a raw model (see :func:`BuildRawModel`).
 
@@ -475,20 +475,20 @@ def BuildFromRawModel(mhandle, alternative_mhandles = None,
         current_num_residues = mhandle.model.GetResidueCount()
         new_num_residues = None
         while current_num_residues != new_num_residues:
-          current_num_residues = mhandle.model.GetResidueCount()
-          ModelExtensions(mhandle, alternative_mhandles, 
-                          extension_strategy = "overlapping")
-          ModelExtensions(mhandle, alternative_mhandles,
-                          extension_strategy = "non-overlapping")
-          new_num_residues = mhandle.model.GetResidueCount()        
+            current_num_residues = mhandle.model.GetResidueCount()
+            ModelExtensions(mhandle, alternative_mhandles, 
+                            extension_strategy="overlapping")
+            ModelExtensions(mhandle, alternative_mhandles,
+                            extension_strategy="non-overlapping")
+            new_num_residues = mhandle.model.GetResidueCount()
 
     # remove terminal gaps
     RemoveTerminalGaps(mhandle)
 
     # close gaps
-    CloseGaps(mhandle, merge_distance = merge_distance, 
-              fragment_db = fragment_db, structure_db = structure_db, 
-              torsion_sampler = torsion_sampler)
+    CloseGaps(mhandle, merge_distance=merge_distance, 
+              fragment_db=fragment_db, structure_db=structure_db, 
+              torsion_sampler=torsion_sampler)
 
     # build sidechains
     BuildSidechains(mhandle, merge_distance, fragment_db,