From c57d8e5f533c218d1a6a81b0b241904fde377ccd Mon Sep 17 00:00:00 2001
From: Jorran Wit <jorrandewit@outlook.com>
Date: Sat, 10 Dec 2016 12:37:40 +0100
Subject: [PATCH] PEP improvements, template indentation/readability
 improvements

---
 commentaries/models.py                        |  28 +--
 .../templates/commentaries/commentaries.html  |  38 ++--
 .../commentaries/commentary_detail.html       |  46 ++--
 .../templates/commentaries/howto.html         |   3 +-
 .../commentaries/request_commentary.html      |   8 +-
 commentaries/urls.py                          |   2 +-
 commentaries/views.py                         |  83 ++++---
 .../templates/comments/reply_to_comment.html  |  39 ++--
 .../templates/comments/reply_to_report.html   |   3 +-
 .../comments/vet_submitted_comments.html      |  80 ++++---
 comments/views.py                             |   2 +-
 journals/templates/journals/add_author.html   |  42 ++--
 .../create_citation_list_metadata.html        |   8 +-
 .../create_funding_info_metadata.html         |   2 +-
 .../journals/harvest_citedby_links.html       |  41 ++--
 .../journals/initiate_publication.html        |   2 +-
 journals/templates/journals/journals.html     |  42 ++--
 .../journals/metadata_xml_deposit.html        |   2 +-
 .../journals/publication_detail.html          | 106 ++++-----
 .../templates/journals/scipost_physics.html   |  87 ++------
 .../journals/scipost_physics_about.html       |  28 +--
 .../journals/scipost_physics_accepted.html    |  12 +-
 .../scipost_physics_info_for_authors.html     |   3 +-
 .../scipost_physics_issue_detail.html         |  14 +-
 .../journals/scipost_physics_issues.html      |   5 +-
 .../journals/scipost_physics_menu.html        |   2 +-
 .../journals/scipost_physics_recent.html      |  22 +-
 .../journals/validate_publication.html        |   2 +-
 scipost/admin.py                              |   6 +-
 scipost/forms.py                              |  29 +--
 .../commands/add_groups_and_permissions.py    |  71 +++---
 scipost/models.py                             | 170 ++++----------
 .../scipost/Fellow_activity_overview.html     |  20 +-
 scipost/templates/scipost/about.html          |  20 +-
 .../templates/scipost/acknowledgement.html    |   4 +-
 .../templates/scipost/add_team_member.html    |  35 +--
 .../templates/scipost/change_password.html    |  37 ++-
 .../templates/scipost/claim_authorships.html  | 112 +++++-----
 scipost/templates/scipost/comments_block.html | 210 +++++++++---------
 .../templates/scipost/contributor_info.html   |  12 +-
 scipost/templates/scipost/create_graph.html   |   2 +-
 .../draft_registration_invitation.html        | 196 ++++++++--------
 .../edit_invitation_personal_message.html     |   2 +-
 .../scipost/email_group_members.html          |   2 +-
 .../templates/scipost/email_particular.html   |   2 +-
 scipost/templates/scipost/index.html          |  86 +++----
 scipost/templates/scipost/list_contents.html  | 130 +++++------
 scipost/views.py                              |   1 -
 48 files changed, 872 insertions(+), 1027 deletions(-)

diff --git a/commentaries/models.py b/commentaries/models.py
index 694b51c6b..c216ce359 100644
--- a/commentaries/models.py
+++ b/commentaries/models.py
@@ -61,7 +61,7 @@ class Commentary(models.Model):
         verbose_name_plural = 'Commentaries'
 
 
-    def __str__ (self):
+    def __str__(self):
         return self.pub_title
 
 
@@ -106,7 +106,7 @@ class Commentary(models.Model):
         return template.render(context)
 
 
-    def header_as_li (self):
+    def header_as_li(self):
         # for display in search lists
         context = Context({'scipost_url': self.scipost_url(), 'pub_title': self.pub_title,
                            'author_list': self.author_list,
@@ -137,13 +137,11 @@ class Commentary(models.Model):
         return template.render(context)
 
 
-    def simple_header_as_li (self):
+    def simple_header_as_li(self):
         # for display in Lists
         context = Context({'scipost_url': self.scipost_url(), 'pub_title': self.pub_title,
                            'author_list': self.author_list})
         header = ('<li>'
-                  #'<div class="flex-container">'
-                  #'<div class="flex-whitebox0">'
                   '<p><a href="{{ scipost_url }}" '
                   'class="pubtitleli">{{ pub_title }}</a></p>'
                   '<p>by {{ author_list }}')
@@ -156,39 +154,27 @@ class Commentary(models.Model):
             header += ', <a href="{{ arxiv_link }}">{{ arxiv_link }}</a>'
             context['arxiv_link'] = self.arxiv_link
         header += '</p>'
-        header += (#'</div></div>'
-                   '</li>')
+        header += '</li>'
         template = Template(header)
         return template.render(context)
 
 
-    def parse_links_into_urls (self):
+    def parse_links_into_urls(self):
         """ Takes the arXiv nr or DOI and turns it into the urls """
         if self.pub_DOI:
             self.arxiv_or_DOI_string = self.pub_DOI
-#            self.arxiv_or_DOI_string = self.arxiv_or_DOI_string.replace('http://dx.doi.org/', '')
             self.pub_DOI_link = 'http://dx.doi.org/' + self.pub_DOI
         elif self.arxiv_identifier:
-#            self.arxiv_or_DOI_string = str(self.arxiv_link)
-#            # Format required: either identifier arXiv:1234.56789v10 or old-style arXiv:cond-mat/9712001v1
-#            # strip:
-#            self.arxiv_or_DOI_string = self.arxiv_or_DOI_string.replace('http://', '')
-#            # Old style: from arxiv.org/abs/1234.5678 into arXiv:1234.5678 (new identifier style)
-#            self.arxiv_or_DOI_string = self.arxiv_or_DOI_string.replace('arxiv.org/', '')
-#            self.arxiv_or_DOI_string = self.arxiv_or_DOI_string.replace('abs/', '')
-#            self.arxiv_or_DOI_string = self.arxiv_or_DOI_string.replace('pdf/', '')
-#            # make sure arXiv prefix is there:
-#            self.arxiv_or_DOI_string = 'arXiv:' + self.arxiv_or_DOI_string
             self.arxiv_or_DOI_string = 'arXiv:' + self.arxiv_identifier
             self.arxiv_link = 'http://arxiv.org/abs/' + self.arxiv_identifier
         else: # should never come here
             pass
         self.save()
 
-    def scipost_url (self):
+    def scipost_url(self):
         """ Returns the url of the SciPost Commentary Page """
         return '/commentary/' + self.arxiv_or_DOI_string
 
-    def scipost_url_full (self):
+    def scipost_url_full(self):
         """ Returns the url of the SciPost Commentary Page """
         return 'https://scipost.org/commentary/' + self.arxiv_or_DOI_string
diff --git a/commentaries/templates/commentaries/commentaries.html b/commentaries/templates/commentaries/commentaries.html
index 099c06e0f..1f486812a 100644
--- a/commentaries/templates/commentaries/commentaries.html
+++ b/commentaries/templates/commentaries/commentaries.html
@@ -3,7 +3,7 @@
 {% block pagetitle %}: Commentaries{% endblock pagetitle %}
 
 {% block headsup %}
-<script type="text/javascript" async src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>
+<script type="text/javascript" async src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>
 {% endblock headsup %}
 
 {% block bodysup %}
@@ -35,31 +35,31 @@
   </div>
 
   {% if commentary_search_list %}
-  <br />
-  <hr class="hr12">
-  <h3>Search results:</h3>
-  <ul>
-    {% for commentary in commentary_search_list %}
-    {{ commentary.header_as_li }}
-    {% endfor %}
-  </ul>
+    <br />
+    <hr class="hr12">
+    <h3>Search results:</h3>
+    <ul>
+      {% for commentary in commentary_search_list %}
+        {{ commentary.header_as_li }}
+      {% endfor %}
+    </ul>
   {% elif form.has_changed %}
-  <h3>No match found for your search query.</h3>
+    <h3>No match found for your search query.</h3>
   {% endif %}
 
 </section>
 
 
 {% if comment_recent_list %}
-<section>
- <hr class="hr12">
- <h2>Recent Comments</h2>
- <ul>
-   {% for comment in comment_recent_list %}
-   {{ comment.simple_header_as_li }}
-   {% endfor %}
- </ul>
-</section>
+  <section>
+   <hr class="hr12">
+   <h2>Recent Comments</h2>
+   <ul>
+     {% for comment in comment_recent_list %}
+     {{ comment.simple_header_as_li }}
+     {% endfor %}
+   </ul>
+  </section>
 {% endif %}
 
 {% if commentary_recent_list %}
diff --git a/commentaries/templates/commentaries/commentary_detail.html b/commentaries/templates/commentaries/commentary_detail.html
index 35dde2ba2..13ff0adbe 100644
--- a/commentaries/templates/commentaries/commentary_detail.html
+++ b/commentaries/templates/commentaries/commentary_detail.html
@@ -8,22 +8,22 @@
 
 <script>
   $(document).ready(function(){
-  $("#commentsbutton").click(function(){
-  $("#commentslist").toggle();
-  });
+    $("#commentsbutton").click(function(){
+      $("#commentslist").toggle();
+    });
 
     var comment_text_input = $("#id_comment_text");
 
     function set_comment_text(value) {
       $("#preview-comment_text").text(value)
     }
-    set_comment_text(comment_text_input.val())
+    set_comment_text(comment_text_input.val());
 
     comment_text_input.keyup(function(){
       var new_text = $(this).val()
       set_comment_text(new_text)
       MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
-    })
+    });
 
   });
 </script>
@@ -44,7 +44,9 @@
       <h2>Original publication: </h2>
     </div>
   </div>
+  
   {{ commentary.header_as_table }}
+  
   <h3>Abstract:</h3>
   <p>{{ commentary.pub_abstract }}</p>
 
@@ -55,25 +57,25 @@
 
 
 {% if user.is_authenticated and commentary.open_for_commenting and perms.scipost.can_submit_comments %}
-<section>
-  <hr class="hr12">
-  <div class="flex-greybox">
-    <h1>Contribute a Comment:</h1>
-  </div>
-  <form action="{% url 'commentaries:commentary' arxiv_or_DOI_string=commentary.arxiv_or_DOI_string %}" method="post">
-    {% csrf_token %}
-    {% load crispy_forms_tags %}
-    {% crispy form %}
-  </form>
-
-  <div class="row">
-    <div class="col-10">
-      <h3>Preview of your comment:</h3>
-      <p id="preview-comment_text"></p>
+  <section>
+    <hr class="hr12">
+    <div class="flex-greybox">
+      <h1>Contribute a Comment:</h1>
+    </div>
+    <form action="{% url 'commentaries:commentary' arxiv_or_DOI_string=commentary.arxiv_or_DOI_string %}" method="post">
+      {% csrf_token %}
+      {% load crispy_forms_tags %}
+      {% crispy form %}
+    </form>
+
+    <div class="row">
+      <div class="col-10">
+        <h3>Preview of your comment:</h3>
+        <p id="preview-comment_text"></p>
+      </div>
     </div>
-  </div>
 
-</section>
+  </section>
 {% endif %}
 
 
diff --git a/commentaries/templates/commentaries/howto.html b/commentaries/templates/commentaries/howto.html
index 57bd79379..e954e8030 100644
--- a/commentaries/templates/commentaries/howto.html
+++ b/commentaries/templates/commentaries/howto.html
@@ -3,7 +3,7 @@
 {% block pagetitle %}: Commentaries{% endblock pagetitle %}
 
 {% block headsup %}
-<script type="text/javascript" async src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>
+  <script type="text/javascript" async src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>
 {% endblock headsup %}
 
 {% block bodysup %}
@@ -17,6 +17,7 @@
   <ul>
     <li><a href="{% url 'commentaries:request_commentary' %}">Request opening a SciPost Commentary Page</a></li>
   </ul>
+  
   <br/>
   <h3>Standardized URLs</h3>
   <p>In order to facilitate localization of commentaries on particular publications, within SciPost, all Commentary Pages have a standardized URL of the form</p>
diff --git a/commentaries/templates/commentaries/request_commentary.html b/commentaries/templates/commentaries/request_commentary.html
index f25086c00..598590ad5 100644
--- a/commentaries/templates/commentaries/request_commentary.html
+++ b/commentaries/templates/commentaries/request_commentary.html
@@ -16,7 +16,7 @@
 
     function show(indices){
       allToggableRows.each(function(index){
-        if ($.inArray( index, indices) != -1){
+        if($.inArray( index, indices) != -1){
           $(this).hide()
         }else{
           $(this).show()
@@ -25,12 +25,6 @@
       })
     }
 
-//    if ($('select#id_type').val() == "") {
-//      allToggableRows.each(function(index){
-//      $(this).hide()
-//      })
-//    }
-
     switch ($('select#id_type').val()) {
      case "":
        allToggableRows.hide()
diff --git a/commentaries/urls.py b/commentaries/urls.py
index 965d04d17..f1abd660c 100644
--- a/commentaries/urls.py
+++ b/commentaries/urls.py
@@ -8,7 +8,7 @@ urlpatterns = [
     url(r'^$', views.commentaries, name='commentaries'),
     url(r'^browse/(?P<discipline>[a-z]+)/(?P<nrweeksback>[0-9]+)/$', views.browse, name='browse'),
     url(r'^howto$', TemplateView.as_view(template_name='commentaries/howto.html'), name='howto'),
-    #url(r'^(?P<commentary_id>[0-9]+)/$', views.commentary_detail, name='commentary'),
+
     # Match a DOI-based link:
     url(r'^(?P<arxiv_or_DOI_string>10.[0-9]{4,9}/[-._;()/:a-zA-Z0-9]+)/$', views.commentary_detail, name='commentary'),
     # Match an arxiv-based link:
diff --git a/commentaries/views.py b/commentaries/views.py
index 4814b4d72..88f4d7c69 100644
--- a/commentaries/views.py
+++ b/commentaries/views.py
@@ -38,38 +38,37 @@ def request_commentary(request):
     if request.method == 'POST':
         form = RequestCommentaryForm(request.POST)
         if form.is_valid():
-#            if form.cleaned_data['arxiv_identifier'] is None and form.cleaned_data['pub_DOI'] is None:
             errormessage = ''
             existing_commentary = None
-            if form.cleaned_data['arxiv_identifier'] =='' and form.cleaned_data['pub_DOI'] == '':
+            if not form.cleaned_data['arxiv_identifier'] and not form.cleaned_data['pub_DOI']:
                 errormessage = ('You must provide either a DOI (for a published paper) '
                                 'or an arXiv identifier (for a preprint).')
-            elif (form.cleaned_data['arxiv_identifier'] !='' and
+            elif (form.cleaned_data['arxiv_identifier'] and
                   (Commentary.objects
                    .filter(arxiv_identifier=form.cleaned_data['arxiv_identifier']).exists())):
                 errormessage = 'There already exists a Commentary Page on this preprint, see'
                 existing_commentary = get_object_or_404(
                     Commentary,
                     arxiv_identifier=form.cleaned_data['arxiv_identifier'])
-            elif (form.cleaned_data['pub_DOI'] !='' and
+            elif (form.cleaned_data['pub_DOI'] and
                   Commentary.objects.filter(pub_DOI=form.cleaned_data['pub_DOI']).exists()):
                 errormessage = 'There already exists a Commentary Page on this publication, see'
                 existing_commentary = get_object_or_404(Commentary, pub_DOI=form.cleaned_data['pub_DOI'])
-            if errormessage != '':
+            if errormessage:
                 doiform = DOIToQueryForm()
                 identifierform = IdentifierToQueryForm()
                 context = {'form': form, 'doiform': doiform, 'identifierform': identifierform,
                            'errormessage': errormessage,
                            'existing_commentary': existing_commentary}
                 return render(request, 'commentaries/request_commentary.html', context)
-            # otherwise we can create the Commentary
+            
+            # Otherwise we can create the Commentary
             contributor = Contributor.objects.get(user=request.user)
             commentary = Commentary (
                 requested_by = contributor,
                 type = form.cleaned_data['type'],
                 discipline = form.cleaned_data['discipline'],
                 domain = form.cleaned_data['domain'],
-#                specialization = form.cleaned_data['specialization'],
                 subject_area = form.cleaned_data['subject_area'],
                 pub_title = form.cleaned_data['pub_title'],
                 arxiv_identifier = form.cleaned_data['arxiv_identifier'],
@@ -85,7 +84,7 @@ def request_commentary(request):
                 )
             commentary.parse_links_into_urls()
             commentary.save()
-#            return HttpResponseRedirect('request_commentary_ack')
+            
             context = {'ack_header': 'Thank you for your request for a Commentary Page',
                        'ack_message': 'Your request will soon be handled by an Editor. ',
                        'followup_message': 'Return to your ',
@@ -114,13 +113,14 @@ def prefill_using_DOI(request):
             elif Commentary.objects.filter(pub_DOI=doiform.cleaned_data['doi']).exists():
                 errormessage = 'There already exists a Commentary Page on this publication, see'
                 existing_commentary = get_object_or_404(Commentary, pub_DOI=doiform.cleaned_data['doi'])
-            if errormessage != '':
+            if errormessage:
                 form = RequestCommentaryForm()
                 identifierform = IdentifierToQueryForm()
                 context = {'form': form, 'doiform': doiform, 'identifierform': identifierform,
                            'errormessage': errormessage,
                            'existing_commentary': existing_commentary}
                 return render(request, 'commentaries/request_commentary.html', context)
+            
             # Otherwise we query Crossref for the information:
             try:
                 queryurl = 'http://api.crossref.org/works/%s' % doiform.cleaned_data['doi']
@@ -133,28 +133,31 @@ def prefill_using_DOI(request):
                 for author in doiqueryJSON['message']['author'][1:]:
                     authorlist += ', ' + author['given'] + ' ' + author['family']
                 journal = doiqueryJSON['message']['container-title'][0]
+                
                 try:
                     volume = doiqueryJSON['message']['volume']
-                except:
+                except KeyError:
                     volume = ''
+                
                 pages = ''
                 try:
                     pages = doiqueryJSON['message']['article-number'] # for Phys Rev
-                except:
+                except KeyError:
                     pass
                 try:
                     pages = doiqueryJSON['message']['page']
-                except:
+                except KeyError:
                     pass
+                
                 pub_date = ''
                 try:
                     pub_date = (str(doiqueryJSON['message']['issued']['date-parts'][0][0]) + '-' +
                                 str(doiqueryJSON['message']['issued']['date-parts'][0][1]))
                     try:
                         pub_date += '-' + str(doiqueryJSON['message']['issued']['date-parts'][0][2])
-                    except:
+                    except (IndexError, KeyError):
                         pass
-                except:
+                except (IndexError, KeyError):
                     pass
                 pub_DOI = doiform.cleaned_data['doi']
                 form = RequestCommentaryForm(
@@ -167,7 +170,7 @@ def prefill_using_DOI(request):
                 context = {'form': form, 'doiform': doiform, 'identifierform': identifierform,}
                 context['title'] = pub_title
                 return render(request, 'commentaries/request_commentary.html', context)
-            except:
+            except (IndexError, KeyError, ValueError):
                 pass
         else:
             pass
@@ -194,7 +197,7 @@ def prefill_using_identifier(request):
                 errormessage = 'There already exists a Commentary Page on this preprint, see'
                 existing_commentary = get_object_or_404(
                     Commentary, arxiv_identifier=identifierform.cleaned_data['identifier'])
-            if errormessage != '':
+            if errormessage:
                 form = RequestCommentaryForm()
                 doiform = DOIToQueryForm()
                 context = {'form': form, 'doiform': doiform, 'identifierform': identifierform,
@@ -206,26 +209,29 @@ def prefill_using_identifier(request):
                 queryurl = ('http://export.arxiv.org/api/query?id_list=%s'
                             % identifierform.cleaned_data['identifier'])
                 arxivquery = feedparser.parse(queryurl)
+                
                 # If paper has been published, should comment on published version
                 try:
                     arxiv_journal_ref = arxivquery['entries'][0]['arxiv_journal_ref']
                     errormessage = ('This paper has been published as ' + arxiv_journal_ref
                                     + '. Please comment on the published version.')
-                except:
+                except (IndexError, KeyError):
                     pass
                 try:
                     arxiv_doi = arxivquery['entries'][0]['arxiv_doi']
                     errormessage = ('This paper has been published under DOI ' + arxiv_DOI
                                     + '. Please comment on the published version.')
-                except:
+                except (IndexError, KeyError):
                     pass
-                if errormessage != '':
+                
+                if errormessage:
                     form = RequestCommentaryForm()
                     doiform = DOIToQueryForm()
                     context = {'form': form, 'doiform': doiform, 'identifierform': identifierform,
                                'errormessage': errormessage,
                                'existing_commentary': existing_commentary}
                     return render(request, 'commentaries/request_commentary.html', context)
+                
                 # otherwise prefill the form:
                 metadata = arxivquery
                 pub_title = arxivquery['entries'][0]['title']
@@ -243,7 +249,7 @@ def prefill_using_identifier(request):
                 context = {'form': form, 'doiform': doiform, 'identifierform': identifierform}
                 context['title'] = pub_title
                 return render(request, 'commentaries/request_commentary.html', context)
-            except: # something went wrong with processing the arXiv data
+            except (IndexError, KeyError, ValueError): # something went wrong with processing the arXiv data
                 errormessage = 'An error occurred while processing the arXiv data. Are you sure this identifier exists?'
                 form = RequestCommentaryForm()
                 doiform = DOIToQueryForm()
@@ -251,7 +257,6 @@ def prefill_using_identifier(request):
                            'errormessage': errormessage,
                            'existing_commentary': existing_commentary}
                 return render(request, 'commentaries/request_commentary.html', context)
-#                pass
         else:
             pass
     return redirect(reverse('commentaries:request_commentary'))
@@ -337,8 +342,6 @@ def vet_commentary_request_ack(request, commentary_id):
                 emailmessage.send(fail_silently=False)
                 commentary.delete()
 
-    #context = {'commentary_id': commentary_id }
-    #return render(request, 'commentaries/vet_commentary_request_ack.html', context)
     context = {'ack_header': 'SciPost Commentary request vetted.',
                'followup_message': 'Return to the ',
                'followup_link': reverse('commentaries:vet_commentary_requests'),
@@ -388,7 +391,7 @@ def browse(request, discipline, nrweeksback):
             commentary_search_list.order_by('-pub_date')
         else:
             commentary_search_list = []
-        context = {'form': form, 'commentary_search_list': commentary_search_list }
+        context = {'form': form, 'commentary_search_list': commentary_search_list}
         return HttpResponseRedirect(request, 'commentaries/commentaries.html', context)
     else:
         form = CommentarySearchForm()
@@ -403,34 +406,27 @@ def browse(request, discipline, nrweeksback):
 
 def commentary_detail(request, arxiv_or_DOI_string):
     commentary = get_object_or_404(Commentary, arxiv_or_DOI_string=arxiv_or_DOI_string)
-#    other_versions = Commentary.objects.filter(
-#        arxiv_identifier_wo_vn_nr=submission.arxiv_identifier_wo_vn_nr
-#    ).exclude(pk=submission.id)
     comments = commentary.comment_set.all()
     if request.method == 'POST':
         form = CommentForm(request.POST)
         if form.is_valid():
             author = Contributor.objects.get(user=request.user)
-            newcomment = Comment (
-                commentary = commentary,
-                author = author,
-                is_rem = form.cleaned_data['is_rem'],
-                is_que = form.cleaned_data['is_que'],
-                is_ans = form.cleaned_data['is_ans'],
-                is_obj = form.cleaned_data['is_obj'],
-                is_rep = form.cleaned_data['is_rep'],
-                is_val = form.cleaned_data['is_val'],
-                is_lit = form.cleaned_data['is_lit'],
-                is_sug = form.cleaned_data['is_sug'],
-                comment_text = form.cleaned_data['comment_text'],
-                remarks_for_editors = form.cleaned_data['remarks_for_editors'],
-                date_submitted = timezone.now(),
+            newcomment = Comment(commentary=commentary, author=author,
+                is_rem=form.cleaned_data['is_rem'],
+                is_que=form.cleaned_data['is_que'],
+                is_ans=form.cleaned_data['is_ans'],
+                is_obj=form.cleaned_data['is_obj'],
+                is_rep=form.cleaned_data['is_rep'],
+                is_val=form.cleaned_data['is_val'],
+                is_lit=form.cleaned_data['is_lit'],
+                is_sug=form.cleaned_data['is_sug'],
+                comment_text=form.cleaned_data['comment_text'],
+                remarks_for_editors=form.cleaned_data['remarks_for_editors'],
+                date_submitted=timezone.now(),
                 )
             newcomment.save()
             author.nr_comments = Comment.objects.filter(author=author).count()
             author.save()
-            #request.session['commentary_id'] = commentary.id
-            #return HttpResponseRedirect(reverse('comments:comment_submission_ack'))
             context = {'ack_header': 'Thank you for contributing a Comment.',
                        'ack_message': 'It will soon be vetted by an Editor.',
                        'followup_message': 'Back to the ',
@@ -443,7 +439,6 @@ def commentary_detail(request, arxiv_or_DOI_string):
             return render(request, 'scipost/acknowledgement.html', context)
     else:
         form = CommentForm()
-
     try:
         author_replies = Comment.objects.filter(commentary=commentary,
                                                 is_author_reply=True,
diff --git a/comments/templates/comments/reply_to_comment.html b/comments/templates/comments/reply_to_comment.html
index 389bd6839..19cdddfbe 100644
--- a/comments/templates/comments/reply_to_comment.html
+++ b/comments/templates/comments/reply_to_comment.html
@@ -30,22 +30,25 @@
   <h1>SciPost Reply to Comment Page</h1>
   <hr class="hr12">
   {% if comment.commentary %}
-  <h1>The Commentary concerned:</h1>
-  {{ commentary.header_as_table }}
-  <h3>Abstract:</h3>
-  <p>{{ commentary.pub_abstract }}</p>
+    <h1>The Commentary concerned:</h1>
+    {{ commentary.header_as_table }}
+    
+    <h3>Abstract:</h3>
+    <p>{{ commentary.pub_abstract }}</p>
   {% endif %}
   {% if comment.submission %}
-  <h1>The Submission concerned:</h1>
-  {{ submission.header_as_table }}
-  <h3>Abstract:</h3>
-  <p>{{ submission.abstract }}</p>
+    <h1>The Submission concerned:</h1>
+    {{ submission.header_as_table }}
+    
+    <h3>Abstract:</h3>
+    <p>{{ submission.abstract }}</p>
   {% endif %}
   {% if comment.thesislink %}
-  <h1>The Thesis concerned:</h1>
-  {{ thesislink.header_as_table }}
-  <h3>Abstract:</h3>
-  <p>{{ thesislink.abstract }}</p>
+    <h1>The Thesis concerned:</h1>
+    {{ thesislink.header_as_table }}
+    
+    <h3>Abstract:</h3>
+    <p>{{ thesislink.abstract }}</p>
   {% endif %}
   <br>
 
@@ -54,11 +57,11 @@
 
    <div class="flex-container">
       <div class="flex-commentbox">
-	{{ comment.print_identifier }}
-	{{ comment.categories_as_ul }}
+        {{ comment.print_identifier }}
+        {{ comment.categories_as_ul }}
         <div class="opinionsDisplay">
-	  {{ comment.opinions_as_ul }}
-	</div>
+          {{ comment.opinions_as_ul }}
+        </div>
       </div>
    </div>
    <div class="row">
@@ -71,9 +74,9 @@
   <hr class="hr6">
   <h1>Your Reply to this Comment:</h1>
   {% if is_author %}
-  <h3>(you are identified as an author, your reply will appear as an author reply)</h3>
+    <h3>(you are identified as an author, your reply will appear as an author reply)</h3>
   {% else %}
-  <h3>(you are not identified as an author of this publication; if you are, you can claim authorship on your Personal Page)</h3>
+    <h3>(you are not identified as an author of this publication; if you are, you can claim authorship on your Personal Page)</h3>
   {% endif %}
   <form action="{% url 'comments:reply_to_comment' comment.id %}" method="post">
     {% csrf_token %}
diff --git a/comments/templates/comments/reply_to_report.html b/comments/templates/comments/reply_to_report.html
index 96ba6ec1d..5ef431359 100644
--- a/comments/templates/comments/reply_to_report.html
+++ b/comments/templates/comments/reply_to_report.html
@@ -30,12 +30,13 @@
   <h1>SciPost Reply to Report Page</h1>
 
   {% if not is_author %}
-  <h3>(you are not identified as an author of this Submission; if you are, you can claim authorship on your Personal Page)</h3>
+    <h3>(you are not identified as an author of this Submission; if you are, you can claim authorship on your Personal Page)</h3>
   {% else %}
 
   <hr class="hr12">
   <h1>The Submission concerned:</h1>
   {{ report.submission.header_as_table }}
+  
   <h3>Abstract:</h3>
   <p>{{ report.submission.abstract }}</p>
   <br>
diff --git a/comments/templates/comments/vet_submitted_comments.html b/comments/templates/comments/vet_submitted_comments.html
index a9e96013b..5de9029a4 100644
--- a/comments/templates/comments/vet_submitted_comments.html
+++ b/comments/templates/comments/vet_submitted_comments.html
@@ -6,52 +6,50 @@
 
 <section>
   {% if not comments_to_vet %}
-  <h1>There are no comments for you to vet.</h1>
-
+    <h1>There are no comments for you to vet.</h1>
   {% else %}
+    <h1>SciPost Comment to vet:</h1>
+    <hr class="hr12"/>
 
-  <h1>SciPost Comment to vet:</h1>
-  <hr class="hr12"/>
-
-  {% for comment_to_vet in comments_to_vet %}
+    {% for comment_to_vet in comments_to_vet %}
 
-  {% if comment_to_vet.commentary %}
-  <h3>From Commentary (<a href="{% url 'commentaries:commentary' arxiv_or_DOI_string=comment_to_vet.commentary.arxiv_or_DOI_string %}">link</a>)</h3>
-  {{ comment_to_vet.commentary.header_as_table }}
-  <br />
-  {% endif %}
-
-  {% if comment_to_vet.submission %}
-  <h3>From Submission (<a href="{% url 'submissions:submission' arxiv_identifier_w_vn_nr=comment_to_vet.submission.arxiv_identifier_w_vn_nr %}">link</a>)</h3>
-  {{ comment_to_vet.submission.header_as_table }}
-  <br />
-  {% endif %}
-
-
-  <hr style="border-style: dotted;" />
-  <h3>The Comment to be vetted:</h3>
+      {% if comment_to_vet.commentary %}
+        <h3>From Commentary (<a href="{% url 'commentaries:commentary' arxiv_or_DOI_string=comment_to_vet.commentary.arxiv_or_DOI_string %}">link</a>)</h3>
+        {{ comment_to_vet.commentary.header_as_table }}
+        <br />
+      {% endif %}
 
-  <div class="row">
-    <div class="col-8">
-      {{ comment_to_vet.print_identifier_for_vetting }}
-      <h3>Comment text:</h3>
-      <p>{{ comment_to_vet.comment_text }}</p>
-      {% if comment_to_vet.remarks_for_editors %}
-        <h3>Remarks for Editors only:</h3>
-        <p>{{ comment_to_vet.remarks_for_editors }}</p>
+      {% if comment_to_vet.submission %}
+        <h3>From Submission (<a href="{% url 'submissions:submission' arxiv_identifier_w_vn_nr=comment_to_vet.submission.arxiv_identifier_w_vn_nr %}">link</a>)</h3>
+        {{ comment_to_vet.submission.header_as_table }}
+        <br />
       {% endif %}
-    </div>
-    <div class="col-4">
-      <form action="{% url 'comments:vet_submitted_comment_ack' comment_id=comment_to_vet.id %}" method="post">
-        {% csrf_token %}
-        {{ form.as_ul }}
-        <input type="submit" value="Submit" />
-      </form>
-    </div>
-  </div>
-  <hr class="hr12"/>
-
-  {% endfor %}
+
+      <hr style="border-style: dotted;" />
+      <h3>The Comment to be vetted:</h3>
+
+      <div class="row">
+        <div class="col-8">
+          {{ comment_to_vet.print_identifier_for_vetting }}
+          <h3>Comment text:</h3>
+          <p>{{ comment_to_vet.comment_text }}</p>
+          
+          {% if comment_to_vet.remarks_for_editors %}
+            <h3>Remarks for Editors only:</h3>
+            <p>{{ comment_to_vet.remarks_for_editors }}</p>
+          {% endif %}
+        </div>
+        <div class="col-4">
+          <form action="{% url 'comments:vet_submitted_comment_ack' comment_id=comment_to_vet.id %}" method="post">
+            {% csrf_token %}
+            {{ form.as_ul }}
+            <input type="submit" value="Submit" />
+          </form>
+        </div>
+      </div>
+      <hr class="hr12"/>
+
+    {% endfor %}
   {% endif %}
 
 </section>
diff --git a/comments/views.py b/comments/views.py
index 6b779bdbe..5fef42bb0 100644
--- a/comments/views.py
+++ b/comments/views.py
@@ -148,7 +148,7 @@ def reply_to_comment(request, comment_id):
                 date_submitted = timezone.now(),
                 )
             newcomment.save()
-            #return HttpResponseRedirect(reverse('comments:comment_submission_ack'))
+            
             context = {'ack_header': 'Thank you for contributing a Reply.',
                        'ack_message': 'It will soon be vetted by an Editor.',
                        'followup_message': 'Back to the ',}
diff --git a/journals/templates/journals/add_author.html b/journals/templates/journals/add_author.html
index 56e008942..241de8b1a 100644
--- a/journals/templates/journals/add_author.html
+++ b/journals/templates/journals/add_author.html
@@ -27,13 +27,13 @@
   <h3>Current list of authors as contributors:</h3>
   <p>
     {% for author in publication.authors.all %}
-    <a href="/contributor/{{ author.id }}">{{ author.user.first_name }} {{ author.user.last_name }}</a>&nbsp;
+      <a href="/contributor/{{ author.id }}">{{ author.user.first_name }} {{ author.user.last_name }}</a>&nbsp;
     {% endfor %}
   </p>
   <h3>Current list of additional authors (unregistered):</h3>
   <p>
     {% for author in publication.authors_unregistered.all %}
-    {{ author }}
+      {{ author }}
     {% endfor %}
   </p>
 
@@ -45,28 +45,34 @@
   </form>
 
   {% if contributors_found %}
-  <h3>Identified as contributor:</h3>
-  <table>
-    {% for contributor in contributors_found %}
-    <tr><td>{{ contributor.user.first_name }} {{ contributor.user.last_name }}</td><td>&nbsp;</td>
-      <td><a href="{% url 'journals:add_author' publication_id=publication.id contributor_id=contributor.id %}">Add this Contributor as author of this Publication</a></td></tr>
-    {% endfor %}
-  </table>
+    <h3>Identified as contributor:</h3>
+    <table>
+      {% for contributor in contributors_found %}
+        <tr>
+          <td>{{ contributor.user.first_name }} {{ contributor.user.last_name }}</td>
+          <td>&nbsp;</td>
+          <td><a href="{% url 'journals:add_author' publication_id=publication.id contributor_id=contributor.id %}">Add this Contributor as author of this Publication</a></td>
+        </tr>
+      {% endfor %}
+    </table>
   {% elif form.has_changed %}
-  <p>No Contributor with this name could be identified.</p>
+    <p>No Contributor with this name could be identified.</p>
   {% endif %}
   <br/>
 
   {% if unregistered_authors_found %}
-  <h3>Identified as existing unregistered author:</h3>
-  <table>
-    {% for unreg_auth in unregistered_authors_found %}
-    <tr><td>{{ unreg_auth }}</td><td>&nbsp;</td>
-      <td><a href="{% url 'journals:add_unregistered_author' publication_id=publication.id unregistered_author_id=unreg_auth.id %}">Add this unregistered author as author of this Publication</a></td></tr>
-    {% endfor %}
-  </table>
+    <h3>Identified as existing unregistered author:</h3>
+    <table>
+      {% for unreg_auth in unregistered_authors_found %}
+        <tr>
+          <td>{{ unreg_auth }}</td>
+          <td>&nbsp;</td>
+          <td><a href="{% url 'journals:add_unregistered_author' publication_id=publication.id unregistered_author_id=unreg_auth.id %}">Add this unregistered author as author of this Publication</a></td>
+        </tr>
+      {% endfor %}
+    </table>
   {% elif form.has_changed %}
-  <p>No UnregisteredAuthor with this name could be found in the database.</p>
+    <p>No UnregisteredAuthor with this name could be found in the database.</p>
   {% endif %}
   <br/>
 
diff --git a/journals/templates/journals/create_citation_list_metadata.html b/journals/templates/journals/create_citation_list_metadata.html
index 222f70d6b..410c4ce6b 100644
--- a/journals/templates/journals/create_citation_list_metadata.html
+++ b/journals/templates/journals/create_citation_list_metadata.html
@@ -11,7 +11,7 @@
   </div>
 
   {% if errormessage %}
-  <h2 style="color: red;">{{ errormessage }}</h2>
+    <h2 style="color: red;">{{ errormessage }}</h2>
   {% endif %}
 
   <form action="{% url 'journals:create_citation_list_metadata' doi_string=publication.doi_string %}" method="post">
@@ -25,9 +25,9 @@
   <h3>Current citation list metadata:</h3>
   <table>
     {% for citation in citation_list %}
-    <tr>
-      <td>{{ citation.key }}</td><td>{{ citation.doi }}</td>
-    </tr>
+      <tr>
+        <td>{{ citation.key }}</td><td>{{ citation.doi }}</td>
+      </tr>
     {% endfor %}
   </table>
 
diff --git a/journals/templates/journals/create_funding_info_metadata.html b/journals/templates/journals/create_funding_info_metadata.html
index fb8d39971..3b992c2b0 100644
--- a/journals/templates/journals/create_funding_info_metadata.html
+++ b/journals/templates/journals/create_funding_info_metadata.html
@@ -11,7 +11,7 @@
   </div>
 
   {% if errormessage %}
-  <h2 style="color: red;">{{ errormessage }}</h2>
+    <h2 style="color: red;">{{ errormessage }}</h2>
   {% endif %}
 
   <form action="{% url 'journals:create_funding_info_metadata' doi_string=publication.doi_string %}" method="post">
diff --git a/journals/templates/journals/harvest_citedby_links.html b/journals/templates/journals/harvest_citedby_links.html
index a939bd741..77bda9b30 100644
--- a/journals/templates/journals/harvest_citedby_links.html
+++ b/journals/templates/journals/harvest_citedby_links.html
@@ -24,32 +24,31 @@
   <p>{{ response_deserialized }}</p>
   <ul>
     {% for obj in response_deserialized %}
-    <li>{{ obj }}
-      <ul>
-	{% for obj2 in obj %}
-	<li>{{ obj2 }}
-	  <ul>
-	    {% for obj3 in obj2 %}
-	    <li>{{ obj3 }}
-	      <ul>
-		{% for obj4 in obj3 %}
-		<li>{{ obj4 }}
-		</li>
-		{% endfor %}
-	      </ul>
-	    </li>
-	    {% endfor %}
-	  </ul>
-	</li>
-	{% endfor %}
-      </ul>
-    </li>
+      <li>{{ obj }}
+        <ul>
+        {% for obj2 in obj %}
+          <li>{{ obj2 }}
+            <ul>
+            {% for obj3 in obj2 %}
+              <li>{{ obj3 }}
+                <ul>
+                {% for obj4 in obj3 %}
+                  <li>{{ obj4 }}</li>
+                {% endfor %}
+                </ul>
+              </li>
+            {% endfor %}
+            </ul>
+          </li>
+        {% endfor %}
+        </ul>
+      </li>
     {% endfor %}
   </ul>
 
   <h3>Citations</h3>
   {% for cit in citations %}
-  {{ cit }}
+    {{ cit }}
   {% endfor %}
   {{ nr }}
 
diff --git a/journals/templates/journals/initiate_publication.html b/journals/templates/journals/initiate_publication.html
index 729794595..c4946383e 100644
--- a/journals/templates/journals/initiate_publication.html
+++ b/journals/templates/journals/initiate_publication.html
@@ -11,7 +11,7 @@
   </div>
 
   {% if errormessage %}
-  <h2 style="color: red;">{{ errormessage }}</h2>
+    <h2 style="color: red;">{{ errormessage }}</h2>
   {% endif %}
 
   <form action="{% url 'journals:initiate_publication' %}" method="post" enctype="multipart/form-data">
diff --git a/journals/templates/journals/journals.html b/journals/templates/journals/journals.html
index fc7fc81e2..17839ca95 100644
--- a/journals/templates/journals/journals.html
+++ b/journals/templates/journals/journals.html
@@ -18,19 +18,21 @@
     <div class="col-6">
       <hr class="hr6">
       <div class="flex-container">
-	<div class="SciPostPhysicsBanner">
-	  <h3>SciPost Physics Lecture Notes</h3>
-	</div>
+        <div class="SciPostPhysicsBanner">
+          <h3>SciPost Physics Lecture Notes</h3>
+        </div>
       </div>
       <p>Research-level didactic material in all domains and subject areas of Physics.</p>
       <p style="color: red;">Open for submission!</p>
       <br/>
       <hr class="hr6">
+      
       <div class="flex-container">
-	<div class="SciPostPhysicsBanner">
-	  <h3><a href="{% url 'journals:scipost_physics' %}">SciPost Physics</a></h3>
-	</div>
+        <div class="SciPostPhysicsBanner">
+          <h3><a href="{% url 'journals:scipost_physics' %}">SciPost Physics</a></h3>
+        </div>
       </div>
+      
       <p>SciPost Physics publishes outstanding-quality research articles in all domains and subject areas of Physics.</p>
       <p>The journal accepts three types of content: Letters, Articles and Reviews.</p>
       <p>Letters report broad-interest, significant breakthroughs in Physics, of interest and importance to researchers in multiple subject areas.</p>
@@ -40,10 +42,11 @@
 
       <hr class="hr6">
       <div class="flex-container">
-	<div class="SciPostPhysicsBanner">
-	  <h3>SciPost Physics Select</h3>
-	</div>
+        <div class="SciPostPhysicsBanner">
+          <h3>SciPost Physics Select</h3>
+        </div>
       </div>
+      
       <p>SciPost Physics Select publishes articles of superlative quality in the field of Physics.</p>
       <p>Authors cannot submit directly to this Journal; SPS papers are editorially selected from the most outstanding Submissions to SciPost Physics.</p>
       <p style="color: red;"><em>Coming soon!</p>
@@ -54,18 +57,19 @@
       <hr class="hr6">
       <p>The collection of SciPost Physics Journals covers research in the domains of Experimental, Theoretical and Computational physics, including the following specialties:</p>
       <ul>
-	<li>A: Atomic, Molecular and Optical Physics</li>
-	<li>B: Biophysics</li>
-	<li>C: Condensed Matter Physics</li>
-	<li>F: Fluid Dynamics</li>
-	<li>G: Gravitation, Cosmology and Astroparticle Physics</li>
-	<li>H: High-Energy Physics</li>
-	<li>M: Mathematical Physics</li>
-	<li>N: Nuclear Physics</li>
-	<li>Q: Quantum Statistical Mechanics</li>
-	<li>S: Statistical and Soft Matter Physics</li>
+        <li>A: Atomic, Molecular and Optical Physics</li>
+        <li>B: Biophysics</li>
+        <li>C: Condensed Matter Physics</li>
+        <li>F: Fluid Dynamics</li>
+        <li>G: Gravitation, Cosmology and Astroparticle Physics</li>
+        <li>H: High-Energy Physics</li>
+        <li>M: Mathematical Physics</li>
+        <li>N: Nuclear Physics</li>
+        <li>Q: Quantum Statistical Mechanics</li>
+        <li>S: Statistical and Soft Matter Physics</li>
       </ul>
       <hr class="hr12">
+      
       <h3><a href="{% url 'journals:journals_terms_and_conditions' %}">SciPost Journals Terms and Conditions</a></h3>
       <h3><a href="{% url 'submissions:author_guidelines' %}">Author guidelines</a></h3>
       <h3><a href="{% url 'submissions:sub_and_ref_procedure' %}">Submission and Refereeing procedure</a></h3>
diff --git a/journals/templates/journals/metadata_xml_deposit.html b/journals/templates/journals/metadata_xml_deposit.html
index 0af84e89e..1d9174c2a 100644
--- a/journals/templates/journals/metadata_xml_deposit.html
+++ b/journals/templates/journals/metadata_xml_deposit.html
@@ -13,7 +13,7 @@
   <h2>(using the {{ option }} server)</h2>
 
   {% if errormessage %}
-  <h2 style="color: red;">{{ errormessage }}</h2>
+    <h2 style="color: red;">{{ errormessage }}</h2>
   {% endif %}
 
   <h3>Response headers:</h3>
diff --git a/journals/templates/journals/publication_detail.html b/journals/templates/journals/publication_detail.html
index f951f3fed..fae74accb 100644
--- a/journals/templates/journals/publication_detail.html
+++ b/journals/templates/journals/publication_detail.html
@@ -5,11 +5,11 @@
 {% block headsup %}
 <script>
   $(document).ready(function(){
-  $("#citationslist").hide();
+    $("#citationslist").hide();
 
-  $("#citationslistbutton").click(function(){
-  $("#citationslist").toggle();
-  });
+    $("#citationslistbutton").click(function(){
+      $("#citationslist").toggle();
+    });
   });
 </script>
 {% endblock headsup %}
@@ -33,67 +33,71 @@
   </div>
 
   {% if publication.citedby|length >= 1 %}
-  <hr class="hr6"/>
-  <div class="flex-container">
-    <div class="flex-greybox">
-      <h3>Cited by {{ publication.citedby|length }}</h3>
-      <br/>
-      <button id="citationslistbutton">Toggle view</button>
-    </div>
-    <div class="flex-whitebox">
-      <img src="{% static 'scipost/images/citedby.gif' %}" alt="Crossref Cited-by" width="64" />
+    <hr class="hr6"/>
+    <div class="flex-container">
+      <div class="flex-greybox">
+        <h3>Cited by {{ publication.citedby|length }}</h3>
+        <br/>
+        <button id="citationslistbutton">Toggle view</button>
+      </div>
+      <div class="flex-whitebox">
+        <img src="{% static 'scipost/images/citedby.gif' %}" alt="Crossref Cited-by" width="64" />
+      </div>
     </div>
-  </div>
-  <div class="flex-container" id="citationslist">
-    <div class="flex-whitebox800">
-      {{ publication.citations_as_ul }}
+    <div class="flex-container" id="citationslist">
+      <div class="flex-whitebox800">
+        {{ publication.citations_as_ul }}
+      </div>
     </div>
-  </div>
   {% endif %}
 
   <hr class="hr6"/>
   <h3>View more material from these authors:</h3>
   <p>
     {% for author in publication.authors.all %}
-    <a href="/contributor/{{ author.id }}">{{ author }}</a>&nbsp;&nbsp;
+      <a href="/contributor/{{ author.id }}">{{ author }}</a>&nbsp;&nbsp;
     {% endfor %}
     {% for author in publication.authors_unregistered.all %}
-    {{ author }}&nbsp;&nbsp;
+      {{ author }}&nbsp;&nbsp;
     {% endfor %}
   </p>
 
   {% if request.user|is_in_group:'Editorial Administrators' %}
-  <hr class="hr12"/>
-  <h3>Editorial Administration tools: </h3>
-  <ul>
-    <li>Mark the first author (currently: {% if publication.first_author %}{{ publication.first_author }} {% elif publication.first_author_unregistered %}{{ publication.first_author_unregistered }} (unregistered){% endif %})
-      <div class="row">
-	<div class="col-5">
-	  <p>registered authors:</p>
-	  <ul>
-	    {% for author in publication.authors.all %}
-	    <li><a href="{% url 'journals:mark_first_author' publication_id=publication.id contributor_id=author.id %}">{{ author }}</a></li>
-	    {% endfor %}
-	  </ul>
-	</div>
-	<div class="col-5">
-	  <p>unregistered authors:</p>
-	  <ul>
-	    {% for author_unreg in publication.authors_unregistered.all %}
-	    <li><a href="{% url 'journals:mark_first_author_unregistered' publication_id=publication.id unregistered_author_id=author_unreg.id %}">{{ author_unreg }}</a></li>
-	    {% endfor %}
-	  </ul>
-	</div>
-      </div>
-    </li>
-    <li><a href="{% url 'journals:add_author' publication_id=publication.id %}">Add a missing author</a></li>
-    <li><a href="{% url 'journals:create_citation_list_metadata' doi_string=publication.doi_string %}">Create/update citation list metadata</a></li>
-    <li><a href="{% url 'journals:create_funding_info_metadata' doi_string=publication.doi_string %}">Create/update funding info metadata</a></li>
-    <li><a href="{% url 'journals:create_metadata_xml' doi_string=publication.doi_string %}">Create/update the XML metadata</a></li>
-    <li><a href="{% url 'journals:metadata_xml_deposit' doi_string=publication.doi_string option='test' %}">Test metadata deposit (via Crossref test server)</a></li>
-    <li><a href="{% url 'journals:metadata_xml_deposit' doi_string=publication.doi_string option='deposit' %}">Deposit the metadata to Crossref</a></li>
-    <li><a href="{% url 'journals:harvest_citedby_links' doi_string=publication.doi_string %}">Update Crossref cited-by links</a></li>
-  </ul>
+    <hr class="hr12"/>
+    <h3>Editorial Administration tools: </h3>
+    <ul>
+      <li>Mark the first author (currently: {% if publication.first_author %}{{ publication.first_author }} {% elif publication.first_author_unregistered %}{{ publication.first_author_unregistered }} (unregistered){% endif %})
+        <div class="row">
+        <div class="col-5">
+          <p>registered authors:</p>
+          <ul>
+            {% for author in publication.authors.all %}
+              <li>
+                <a href="{% url 'journals:mark_first_author' publication_id=publication.id contributor_id=author.id %}">{{ author }}</a>
+              </li>
+            {% endfor %}
+          </ul>
+        </div>
+        <div class="col-5">
+          <p>unregistered authors:</p>
+          <ul>
+            {% for author_unreg in publication.authors_unregistered.all %}
+              <li>
+                <a href="{% url 'journals:mark_first_author_unregistered' publication_id=publication.id unregistered_author_id=author_unreg.id %}">{{ author_unreg }}</a>
+              </li>
+            {% endfor %}
+          </ul>
+        </div>
+        </div>
+      </li>
+      <li><a href="{% url 'journals:add_author' publication_id=publication.id %}">Add a missing author</a></li>
+      <li><a href="{% url 'journals:create_citation_list_metadata' doi_string=publication.doi_string %}">Create/update citation list metadata</a></li>
+      <li><a href="{% url 'journals:create_funding_info_metadata' doi_string=publication.doi_string %}">Create/update funding info metadata</a></li>
+      <li><a href="{% url 'journals:create_metadata_xml' doi_string=publication.doi_string %}">Create/update the XML metadata</a></li>
+      <li><a href="{% url 'journals:metadata_xml_deposit' doi_string=publication.doi_string option='test' %}">Test metadata deposit (via Crossref test server)</a></li>
+      <li><a href="{% url 'journals:metadata_xml_deposit' doi_string=publication.doi_string option='deposit' %}">Deposit the metadata to Crossref</a></li>
+      <li><a href="{% url 'journals:harvest_citedby_links' doi_string=publication.doi_string %}">Update Crossref cited-by links</a></li>
+    </ul>
   {% endif %}
 
 
diff --git a/journals/templates/journals/scipost_physics.html b/journals/templates/journals/scipost_physics.html
index 5370b7d66..8e9a3c46c 100644
--- a/journals/templates/journals/scipost_physics.html
+++ b/journals/templates/journals/scipost_physics.html
@@ -4,61 +4,14 @@
 
 {% block headsup %}
 
-<!--
-<script>
-  $(document).ready(function(){
-  $(".TabItem").attr("class", "TabItem inactive");
-  $("#RecentTab").attr("class", "TabItem active");
-  $(".TabSection").hide();
-  $("#Recent").show();
-  $("#IssuesTab").click(function(){
-   $(".TabItem").attr("class", "TabItem inactive");
-   $("#IssuesTab").attr("class", "TabItem active");
-   $(".TabSection").hide();
-   $("#Issues").show();
-  });
-  $("#RecentTab").click(function(){
-   $(".TabItem").attr("class", "TabItem inactive");
-   $("#RecentTab").attr("class", "TabItem active");
-   $(".TabSection").hide();
-   $("#Recent").show();
-  });
-  $("#AcceptedTab").click(function(){
-   $(".TabItem").attr("class", "TabItem inactive");
-   $("#AcceptedTab").attr("class", "TabItem active");
-   $(".TabSection").hide();
-   $("#Accepted").show();
-  });
-  $("#SubmissionsTab").click(function(){
-   $(".TabItem").attr("class", "TabItem inactive");
-   $("#SubmissionsTab").attr("class", "TabItem active");
-   $(".TabSection").hide();
-   $("#Submissions").show();
-  });
-  $("#InfoTab").click(function(){
-   $(".TabItem").attr("class", "TabItem inactive");
-   $("#InfoTab").attr("class", "TabItem active");
-   $(".TabSection").hide();
-   $("#Info").show();
-  });
-  $("#AboutTab").click(function(){
-   $(".TabItem").attr("class", "TabItem inactive");
-   $("#AboutTab").attr("class", "TabItem active");
-   $(".TabSection").hide();
-   $("#About").show();
-  });
-  });
-
-</script>
--->
 <script>
   $(document).ready(function(){
 
-  $(".publicationAbstract").hide();
+    $(".publicationAbstract").hide();
 
-  $(".toggleAbstractButton").click(function(){
-  $(this).parent("li").parent("ul").siblings("p.publicationAbstract").toggle();
-  });
+    $(".toggleAbstractButton").click(function(){
+      $(this).parent("li").parent("ul").siblings("p.publicationAbstract").toggle();
+    });
   });
 </script>
 
@@ -80,9 +33,9 @@
   <div class="flex-container">
     <div class="flex-whitebox800">
       <ul class="publicationHeaderList">
-	{% for paper in current_issue.publication_set.all|dictsort:"paper_nr" %}
-	{{ paper.header_as_li }}
-	{% endfor %}
+        {% for paper in current_issue.publication_set.all|dictsort:"paper_nr" %}
+          {{ paper.header_as_li }}
+        {% endfor %}
       </ul>
     </div>
   </div>
@@ -90,23 +43,23 @@
   {% endif %}
 
   {% if latest_issue %}
-  <div class="flex-container">
-    <div class="flex-greybox">
-      <h2>Latest issue: Vol. {{ latest_issue.in_volume.number }} issue {{ latest_issue.number }}</h2>
+    <div class="flex-container">
+      <div class="flex-greybox">
+        <h2>Latest issue: Vol. {{ latest_issue.in_volume.number }} issue {{ latest_issue.number }}</h2>
+      </div>
     </div>
-  </div>
 
-  <div class="flex-container">
-    {% if latest_issue %}
-    <div class="flex-whitebox800">
-      <ul class="publicationHeaderList">
-	{% for paper in latest_issue.publication_set.all|dictsort:"paper_nr" %}
-	{{ paper.header_as_li }}
-	{% endfor %}
-      </ul>
+    <div class="flex-container">
+      {% if latest_issue %}
+        <div class="flex-whitebox800">
+            <ul class="publicationHeaderList">
+              {% for paper in latest_issue.publication_set.all|dictsort:"paper_nr" %}
+                {{ paper.header_as_li }}
+              {% endfor %}
+            </ul>
+        </div>
       {% endif %}
     </div>
-  </div>
   {% endif %}
 
 </section>
diff --git a/journals/templates/journals/scipost_physics_about.html b/journals/templates/journals/scipost_physics_about.html
index 14f096f4a..722538be7 100644
--- a/journals/templates/journals/scipost_physics_about.html
+++ b/journals/templates/journals/scipost_physics_about.html
@@ -28,17 +28,17 @@
       <h3>Scope</h3>
       <p>SciPost Physics publishes outstanding-quality research articles in the domains of Experimental, Theoretical and Computational physics, among which:</p>
       <ul>
-	<li>Atomic, Molecular and Optical Physics</li>
-	<li>Biophysics</li>
-	<li>Condensed Matter Physics</li>
-	<li>Fluid Dynamics</li>
-	<li>Gravitation</li>
-	<li>Cosmology and Astroparticle Physics</li>
-	<li>High-Energy Physics</li>
-	<li>Mathematical Physics</li>
-	<li>Nuclear Physics</li>
-	<li>Quantum Statistical Mechanics</li>
-	<li>Statistical and Soft Matter Physics</li>
+        <li>Atomic, Molecular and Optical Physics</li>
+        <li>Biophysics</li>
+        <li>Condensed Matter Physics</li>
+        <li>Fluid Dynamics</li>
+        <li>Gravitation</li>
+        <li>Cosmology and Astroparticle Physics</li>
+        <li>High-Energy Physics</li>
+        <li>Mathematical Physics</li>
+        <li>Nuclear Physics</li>
+        <li>Quantum Statistical Mechanics</li>
+        <li>Statistical and Soft Matter Physics</li>
       </ul>
     </div>
   </div>
@@ -50,9 +50,9 @@
       <h3>Content</h3>
       <p>The journal accepts three types of content: <strong>Letters</strong>, <strong>Articles</strong> and <strong>Reviews</strong>.</p>
       <ul>
-	<li><strong>Letters</strong> report broad-interest, significant breakthroughs in Physics, of interest and importance to researchers in multiple subject areas.</li>
-	<li><strong>Articles</strong> provide in-depth, detailed reports of groundbreaking research within one or more subject areas.</li>
-	<li><strong>Reviews</strong> are short pieces taking a snapshot of a research area, written by recognized leaders in the field, providing a critical assessment of current frontline research and providing pointers towards future opportunities.</li>
+        <li><strong>Letters</strong> report broad-interest, significant breakthroughs in Physics, of interest and importance to researchers in multiple subject areas.</li>
+        <li><strong>Articles</strong> provide in-depth, detailed reports of groundbreaking research within one or more subject areas.</li>
+        <li><strong>Reviews</strong> are short pieces taking a snapshot of a research area, written by recognized leaders in the field, providing a critical assessment of current frontline research and providing pointers towards future opportunities.</li>
       </ul>
     </div>
     <div class="col-1"></div>
diff --git a/journals/templates/journals/scipost_physics_accepted.html b/journals/templates/journals/scipost_physics_accepted.html
index b1bc07695..4c328b2f9 100644
--- a/journals/templates/journals/scipost_physics_accepted.html
+++ b/journals/templates/journals/scipost_physics_accepted.html
@@ -17,13 +17,13 @@
 
   <div class="flex-whitebox">
     {% if accepted_SP_submissions %}
-    <ul>
-      {% for submission in accepted_SP_submissions %}
-      {{ submission.header_as_li }}
-      {% endfor %}
-    </ul>
+      <ul>
+        {% for submission in accepted_SP_submissions %}
+          {{ submission.header_as_li }}
+        {% endfor %}
+      </ul>
     {% else %}
-    <h2>All recently accepted Submissions to SciPost Physics have been published.</h2>
+      <h2>All recently accepted Submissions to SciPost Physics have been published.</h2>
     {% endif %}
   </div>
 
diff --git a/journals/templates/journals/scipost_physics_info_for_authors.html b/journals/templates/journals/scipost_physics_info_for_authors.html
index 7c1eb5a3e..b863bfd65 100644
--- a/journals/templates/journals/scipost_physics_info_for_authors.html
+++ b/journals/templates/journals/scipost_physics_info_for_authors.html
@@ -25,7 +25,8 @@
     <ul>
       <li>Make sure you have read and agree with the <a href="{% url 'journals:journals_terms_and_conditions' %}">SciPost Journals Terms and Conditions.</a></li>
       <li>All Submissions to SciPost Physics follow the peer-witnessed refereeing procedures outlined in
-	<a href="{% url 'submissions:sub_and_ref_procedure' %}">Submission and Refereeing procedure</a>.</li>
+        <a href="{% url 'submissions:sub_and_ref_procedure' %}">Submission and Refereeing procedure</a>.
+      </li>
     </ul>
 
     <h3>Decision</h3>
diff --git a/journals/templates/journals/scipost_physics_issue_detail.html b/journals/templates/journals/scipost_physics_issue_detail.html
index 2a6963fb7..25528c54e 100644
--- a/journals/templates/journals/scipost_physics_issue_detail.html
+++ b/journals/templates/journals/scipost_physics_issue_detail.html
@@ -7,11 +7,11 @@
 <script>
   $(document).ready(function(){
 
-  $(".publicationAbstract").hide();
+    $(".publicationAbstract").hide();
 
-  $(".toggleAbstractButton").click(function(){
-  $(this).parent("li").parent("ul").siblings("p.publicationAbstract").toggle();
-  });
+    $(".toggleAbstractButton").click(function(){
+      $(this).parent("li").parent("ul").siblings("p.publicationAbstract").toggle();
+    });
   });
 </script>
 
@@ -32,9 +32,9 @@
   <div class="flex-container">
     <div class="flex-whitebox800">
       <ul class="publicationHeaderList">
-	{% for paper in papers %}
-	{{ paper.header_as_li }}
-	{% endfor %}
+        {% for paper in papers %}
+          {{ paper.header_as_li }}
+        {% endfor %}
       </ul>
     </div>
   </div>
diff --git a/journals/templates/journals/scipost_physics_issues.html b/journals/templates/journals/scipost_physics_issues.html
index fc5f652c0..f2a0d6170 100644
--- a/journals/templates/journals/scipost_physics_issues.html
+++ b/journals/templates/journals/scipost_physics_issues.html
@@ -18,8 +18,9 @@
   <div class="flex-whitebox">
     <ul>
       {% for issue in issues %}
-      <li><a href="{% url 'journals:scipost_physics_issue_detail' volume_nr=issue.in_volume.number issue_nr=issue.number %}">
-	  {{ issue }}</a></li>
+        <li>
+          <a href="{% url 'journals:scipost_physics_issue_detail' volume_nr=issue.in_volume.number issue_nr=issue.number %}">{{ issue }}</a>
+        </li>
       {% endfor %}
   </div>
 
diff --git a/journals/templates/journals/scipost_physics_menu.html b/journals/templates/journals/scipost_physics_menu.html
index a697f3921..53871f8fa 100644
--- a/journals/templates/journals/scipost_physics_menu.html
+++ b/journals/templates/journals/scipost_physics_menu.html
@@ -2,7 +2,7 @@
   <ul class="SciPostPhysicsTabMenu">
     <li>
       <div class="SciPostPhysicsTab">
-	<h3><a href="{% url 'journals:scipost_physics' %}">SciPost Physics</a></h3>
+        <h3><a href="{% url 'journals:scipost_physics' %}">SciPost Physics</a></h3>
       </div>
     </li>
     <li><a href="{% url 'journals:scipost_physics_issues' %}">Issues</li>
diff --git a/journals/templates/journals/scipost_physics_recent.html b/journals/templates/journals/scipost_physics_recent.html
index 49a169cc9..fffddd94d 100644
--- a/journals/templates/journals/scipost_physics_recent.html
+++ b/journals/templates/journals/scipost_physics_recent.html
@@ -6,11 +6,11 @@
 <script>
   $(document).ready(function(){
 
-  $(".publicationAbstract").hide();
+    $(".publicationAbstract").hide();
 
-  $(".toggleAbstractButton").click(function(){
-  $(this).parent("li").parent("ul").siblings("p.publicationAbstract").toggle();
-  });
+    $(".toggleAbstractButton").click(function(){
+      $(this).parent("li").parent("ul").siblings("p.publicationAbstract").toggle();
+    });
   });
 </script>
 {% endblock headsup %}
@@ -30,14 +30,14 @@
 
   <div class="flex-container">
     {% if recent_papers %}
-    <div class="flex-whitebox800">
-      <ul class="publicationHeaderList">
-	{% for paper in recent_papers %}
-	{{ paper.header_as_li }}
-	{% endfor %}
-      </ul>
+      <div class="flex-whitebox800">
+        <ul class="publicationHeaderList">
+          {% for paper in recent_papers %}
+            {{ paper.header_as_li }}
+          {% endfor %}
+        </ul>
+      </div>
       {% endif %}
-    </div>
   </div>
 
   {% include 'journals/scipost_physics_footer.html' %}
diff --git a/journals/templates/journals/validate_publication.html b/journals/templates/journals/validate_publication.html
index 8ac8ecef3..a92459878 100644
--- a/journals/templates/journals/validate_publication.html
+++ b/journals/templates/journals/validate_publication.html
@@ -11,7 +11,7 @@
   </div>
 
   {% if errormessage %}
-  <h2 style="color: red;">{{ errormessage }}</h2>
+    <h2 style="color: red;">{{ errormessage }}</h2>
   {% endif %}
 
   <form action="{% url 'journals:validate_publication' %}" method="post" enctype="multipart/form-data">
diff --git a/scipost/admin.py b/scipost/admin.py
index 00f47a7b2..3c7650cc2 100644
--- a/scipost/admin.py
+++ b/scipost/admin.py
@@ -7,10 +7,7 @@ from guardian.admin import GuardedModelAdmin
 
 from scipost.models import *
 
-#admin.site.register(Contributor)
-
 class ContributorInline(admin.StackedInline):
-#class ContributorInline(admin.TabularInline):
     model = Contributor
 
 class UserAdmin(UserAdmin):
@@ -34,6 +31,7 @@ class DraftInvitationAdmin(admin.ModelAdmin):
 
 admin.site.register(DraftInvitation, DraftInvitationAdmin)
 
+
 class RegistrationInvitationAdmin(admin.ModelAdmin):
     search_fields = ['first_name', 'last_name', 'email', 'invitation_key']
 
@@ -41,8 +39,6 @@ admin.site.register(RegistrationInvitation, RegistrationInvitationAdmin)
 
 
 admin.site.register(AuthorshipClaim)
-#admin.site.register(Opinion)
-
 admin.site.register(Permission)
 
 
diff --git a/scipost/forms.py b/scipost/forms.py
index 275336555..3716ad8d8 100644
--- a/scipost/forms.py
+++ b/scipost/forms.py
@@ -58,7 +58,8 @@ class DraftInvitationForm(forms.ModelForm):
         model = DraftInvitation
         fields = ['title', 'first_name', 'last_name', 'email',
                   'invitation_type',
-                  'cited_in_submission', 'cited_in_publication',]
+                  'cited_in_submission', 'cited_in_publication'
+                 ]
 
     def __init__(self, *args, **kwargs):
         super(DraftInvitationForm, self).__init__(*args, **kwargs)
@@ -91,7 +92,8 @@ class RegistrationInvitationForm(forms.ModelForm):
         fields = ['title', 'first_name', 'last_name', 'email',
                   'invitation_type',
                   'cited_in_submission', 'cited_in_publication',
-                  'message_style', 'personal_message']
+                  'message_style', 'personal_message'
+                 ]
 
     def __init__(self, *args, **kwargs):
         super(RegistrationInvitationForm, self).__init__(*args, **kwargs)
@@ -135,7 +137,8 @@ class UpdatePersonalDataForm(forms.ModelForm):
         model = Contributor
         fields = ['title', 'discipline', 'expertises', 'orcid_id', 'country_of_employment',
                   'affiliation', 'address', 'personalwebpage',
-                  'accepts_SciPost_emails']
+                  'accepts_SciPost_emails'
+                 ]
         widgets = {'country_of_employment': CountrySelectWidget()}
 
 class VetRegistrationForm(forms.Form):
@@ -175,16 +178,6 @@ class UnavailabilityPeriodForm(forms.ModelForm):
         self.fields['end'].widget.attrs.update({'placeholder': 'YYYY-MM-DD'})
 
 
-#class OpinionForm(forms.Form):
-#    opinion = forms.ChoiceField(choices=OPINION_CHOICES, label='Your opinion on this Comment: ')
-
-
-#class AssessmentForm(forms.ModelForm):
-#    class Meta:
-#        model = Assessment
-#        fields = ['relevance', 'importance', 'clarity', 'validity', 'rigour', 'originality', 'significance']
-
-
 class SearchForm(forms.Form):
     query = forms.CharField(max_length=100, label='')
 
@@ -200,7 +193,6 @@ class EmailGroupMembersForm(forms.Form):
         required=False, initial=False,
         label='include SciPost summary at end of message')
 
-
     def __init__(self, *args, **kwargs):
         super(EmailGroupMembersForm, self).__init__(*args, **kwargs)
         self.fields['email_subject'].widget.attrs.update(
@@ -236,10 +228,6 @@ class SendPrecookedEmailForm(forms.Form):
         label='Include SciPost summary at end of message')
     from_address = forms.ChoiceField(choices=SCIPOST_FROM_ADDRESSES)
 
-    # def __init__(self, *args, **kwards):
-    #     super(SendPrecookedEmailForm, self).__init__(*args, **kwargs)
-    #     self.fields['from_address'].widget.attrs.update(
-
 
 class CreateListForm(forms.ModelForm):
     class Meta:
@@ -256,7 +244,7 @@ class CreateListForm(forms.ModelForm):
 class CreateTeamForm(forms.ModelForm):
     class Meta:
         model = Team
-        fields = ['name', ]
+        fields = ['name']
 
     def __init__(self, *args, **kwargs):
         super(CreateTeamForm, self).__init__(*args, **kwargs)
@@ -325,7 +313,8 @@ class SupportingPartnerForm(forms.ModelForm):
         model = SupportingPartner
         fields = ['partner_type', 'institution',
                   'institution_acronym', 'institution_address',
-                  'consortium_members',]
+                  'consortium_members'
+                 ]
 
     def __init__(self, *args, **kwargs):
         super(SupportingPartnerForm, self).__init__(*args, **kwargs)
diff --git a/scipost/management/commands/add_groups_and_permissions.py b/scipost/management/commands/add_groups_and_permissions.py
index 44eb26ce7..b1bec7e86 100644
--- a/scipost/management/commands/add_groups_and_permissions.py
+++ b/scipost/management/commands/add_groups_and_permissions.py
@@ -9,13 +9,16 @@ class Command(BaseCommand):
     help = 'Defines groups and permissions'
     
     def add_arguments(self, parser):
-        """ Append arguments optionally for setup of Contributor roles """
-        parser.add_argument('-u', '--setup-user', metavar='<username>', type=str, required=False, help='Username to make registered contributor')
-        parser.add_argument('-a', '--make-admin', required=False, action='store_true', help='Grant admin permissions to user (superuser only)')
-        parser.add_argument('-t', '--make-tester',  required=False, action='store_true', help='Grant test permissions to user')
+        """Append arguments optionally for setup of Contributor roles."""
+        parser.add_argument('-u', '--setup-user', metavar='<username>', type=str, required=False, 
+                            help='Username to make registered contributor')
+        parser.add_argument('-a', '--make-admin', required=False, action='store_true', 
+                            help='Grant admin permissions to user (superuser only)')
+        parser.add_argument('-t', '--make-tester',  required=False, action='store_true', 
+                            help='Grant test permissions to user')
 
     def handle(self, *args, **options):
-        """ Append all user Groups and setup a Contributor roles to user """
+        """Append all user Groups and setup a Contributor roles to user."""
         
         # Create Groups
         SciPostAdmin, created = Group.objects.get_or_create(name='SciPost Administrators')
@@ -34,75 +37,71 @@ class Command(BaseCommand):
         # Registration and invitations
         can_vet_registration_requests, created = Permission.objects.get_or_create(
             codename='can_vet_registration_requests',
-            name= 'Can vet registration requests',
+            name='Can vet registration requests',
             content_type=content_type)
         can_draft_registration_invitations, created = Permission.objects.get_or_create(
             codename='can_draft_registration_invitations',
-            name= 'Can draft registration invitations',
+            name='Can draft registration invitations',
             content_type=content_type)
         can_manage_registration_invitations, created = Permission.objects.get_or_create(
             codename='can_manage_registration_invitations',
-            name= 'Can manage registration invitations',
+            name='Can manage registration invitations',
             content_type=content_type)
         can_invite_Fellows, created = Permission.objects.get_or_create(
             codename='can_invite_Fellows',
-            name= 'Can invite Fellows',
+            name='Can invite Fellows',
             content_type=content_type)
 
         # Communications
         can_email_group_members, created = Permission.objects.get_or_create(
             codename='can_email_group_members',
-            name= 'Can email group members',
+            name='Can email group members',
             content_type=content_type)
         can_email_particulars, created = Permission.objects.get_or_create(
             codename='can_email_particulars',
-            name= 'Can email particulars',
+            name='Can email particulars',
             content_type=content_type)
 
         # Editorial College
         view_bylaws, created = Permission.objects.get_or_create(
             codename='view_bylaws',
-            name= 'Can view By-laws of Editorial College',
+            name='Can view By-laws of Editorial College',
             content_type=content_type)
-        #can_take_editorial_actions, created = Permission.objects.get_or_create(
-        #    codename='can_take_editorial_actions',
-        #    name= 'Can take editorial actions',
-        #    content_type=content_type)
 
         # Contributions (not related to submissions)
         can_submit_comments, created = Permission.objects.get_or_create(
             codename='can_submit_comments',
-            name= 'Can submit Comments',
+            name='Can submit Comments',
             content_type=content_type)
         can_express_opinion_on_comments, created = Permission.objects.get_or_create(
             codename='can_express_opinion_on_comments',
-            name= 'Can express opinion on Comments',
+            name='Can express opinion on Comments',
             content_type=content_type)
         can_request_commentary_pages, created = Permission.objects.get_or_create(
             codename='can_request_commentary_pages',
-            name= 'Can request opening of Commentara Pages',
+            name='Can request opening of Commentara Pages',
             content_type=content_type)
         can_request_thesislinks, created = Permission.objects.get_or_create(
             codename='can_request_thesislinks',
-            name= 'Can request Thesis Links',
+            name='Can request Thesis Links',
             content_type=content_type)
 
         # Vetting of simple objects
         can_vet_commentary_requests, created = Permission.objects.get_or_create(
             codename='can_vet_commentary_requests',
-            name= 'Can vet Commentary page requests',
+            name='Can vet Commentary page requests',
             content_type=content_type)
         can_vet_thesislink_requests, created = Permission.objects.get_or_create(
             codename='can_vet_thesislink_requests',
-            name= 'Can vet Thesis Link requests',
+            name='Can vet Thesis Link requests',
             content_type=content_type)
         can_vet_authorship_claims, created = Permission.objects.get_or_create(
             codename='can_vet_authorship_claims',
-            name= 'Can vet Authorship claims',
+            name='Can vet Authorship claims',
             content_type=content_type)
         can_vet_comments, created = Permission.objects.get_or_create(
             codename='can_vet_comments',
-            name= 'Can vet submitted Comments',
+            name='Can vet submitted Comments',
             content_type=content_type)
 
         # Submissions
@@ -114,15 +113,15 @@ class Command(BaseCommand):
         # Submission handling
         can_view_pool, created = Permission.objects.get_or_create(
             codename='can_view_pool',
-            name= 'Can view Submissions Pool',
+            name='Can view Submissions Pool',
             content_type=content_type)
         can_assign_submissions, created = Permission.objects.get_or_create(
             codename='can_assign_submissions',
-            name= 'Can assign incoming Submissions to potential Editor-in-charge',
+            name='Can assign incoming Submissions to potential Editor-in-charge',
             content_type=content_type)
         can_take_charge_of_submissions, created = Permission.objects.get_or_create(
             codename='can_take_charge_of_submissions',
-            name= 'Can take charge (become Editor-in-charge) of submissions',
+            name='Can take charge (become Editor-in-charge) of submissions',
             content_type=content_type)
         can_vet_submitted_reports, created = Permission.objects.get_or_create(
             codename='can_vet_submitted_reports',
@@ -132,23 +131,23 @@ class Command(BaseCommand):
         # Refereeing
         can_referee, created = Permission.objects.get_or_create(
             codename='can_referee',
-            name= 'Can act as a referee and submit reports on Submissions',
+            name='Can act as a referee and submit reports on Submissions',
             content_type=content_type)
 
         # Voting
         can_prepare_recommendations_for_voting, created = Permission.objects.get_or_create(
             codename='can_prepare_recommendations_for_voting',
-            name = 'Can prepare recommendations for voting',
+            name='Can prepare recommendations for voting',
             content_type=content_type)
         can_fix_College_decision, created = Permission.objects.get_or_create(
             codename='can_fix_College_decision',
-            name = 'Can fix the College voting decision',
+            name='Can fix the College voting decision',
             content_type=content_type)
 
         # Production
         can_publish_accepted_submission, created = Permission.objects.get_or_create(
             codename='can_publish_accepted_submission',
-            name = 'Can publish accepted submission',
+            name='Can publish accepted submission',
             content_type=content_type)
 
         # Assign permissions to groups
@@ -179,7 +178,6 @@ class Command(BaseCommand):
         EditorialCollege.permissions.add(
             can_view_pool,
             can_take_charge_of_submissions,
-            #can_take_editorial_actions,
             can_vet_submitted_reports,
             view_bylaws,
         )
@@ -210,12 +208,13 @@ class Command(BaseCommand):
             # Username is given, check options
             try:
                 user = User.objects.get(username=str(options['setup_user']))
-                user.groups.add(RegisteredContributors)
-                self.stdout.write(self.style.SUCCESS('Successfully setup %s as contributor.' % user))
             except User.DoesNotExist:
                 self.stdout.write(self.style.WARNING('User <%s> not found.' % options['update_user']))
-                return
-            
+                return None
+
+            user.groups.add(RegisteredContributors)
+            self.stdout.write(self.style.SUCCESS('Successfully setup %s as contributor.' % user))
+
             if user.is_superuser and options['make_admin']:
                 # Setup admin contributor
                 user.groups.add(SciPostAdmin)
diff --git a/scipost/models.py b/scipost/models.py
index 803d4fca6..bc1395d9a 100644
--- a/scipost/models.py
+++ b/scipost/models.py
@@ -10,7 +10,7 @@ from django.utils.safestring import mark_safe
 
 from django_countries.fields import CountryField
 
-from .models import *
+from scipost.models import *
 
 
 SCIPOST_DISCIPLINES = (
@@ -128,7 +128,8 @@ SCIPOST_SUBJECT_AREAS = (
      ),
 )
 subject_areas_raw_dict = dict(SCIPOST_SUBJECT_AREAS)
-# We want a dict of the form {'Phys:AT': 'Atomic...', ...}
+
+# Make dict of the form {'Phys:AT': 'Atomic...', ...}
 subject_areas_dict = {}
 for k in subject_areas_raw_dict.keys():
     subject_areas_dict.update(dict(subject_areas_raw_dict[k]))
@@ -192,8 +193,7 @@ class Contributor(models.Model):
     status = models.SmallIntegerField(default=0, choices=CONTRIBUTOR_STATUS)
     title = models.CharField(max_length=4, choices=TITLE_CHOICES)
     discipline = models.CharField(max_length=20, choices=SCIPOST_DISCIPLINES,
-                                  default='physics',
-                                  verbose_name='Main discipline')
+                                  default='physics', verbose_name='Main discipline')
     expertises = ChoiceArrayField(
         models.CharField(max_length=10, choices=SCIPOST_SUBJECT_AREAS),
         blank=True, null=True)
@@ -212,36 +212,34 @@ class Contributor(models.Model):
         default=True,
         verbose_name="I accept to receive SciPost emails")
 
-    def __str__ (self):
-        return self.user.last_name + ', ' + self.user.first_name
 
+    def __str__(self):
+        return '%s, %s' % (self.user.last_name, self.user.first_name)
 
     def is_currently_available(self):
-        unav_periods = UnavailabilityPeriod.objects.filter(
-            contributor=self)
-        available = True
+        unav_periods = UnavailabilityPeriod.objects.filter(contributor=self)
+
         today = datetime.date.today()
         for unav in unav_periods:
             if unav.start < today and unav.end > today:
-                available = False
-        return available
-
+                return False
+        return True
 
-    def private_info_as_table (self):
+    def private_info_as_table(self):
         template = Template('''
-        <table>
-        <tr><td>Title: </td><td>&nbsp;</td><td>{{ title }}</td></tr>
-        <tr><td>First name: </td><td>&nbsp;</td><td>{{ first_name }}</td></tr>
-        <tr><td>Last name: </td><td>&nbsp;</td><td>{{ last_name }}</td></tr>
-        <tr><td>Email: </td><td>&nbsp;</td><td>{{ email }}</td></tr>
-        <tr><td>ORCID id: </td><td>&nbsp;</td><td>{{ orcid_id }}</td></tr>
-        <tr><td>Country of employment: </td><td>&nbsp;</td>
-        <td>{{ country_of_employment }}</td></tr>
-        <tr><td>Affiliation: </td><td>&nbsp;</td><td>{{ affiliation }}</td></tr>
-        <tr><td>Address: </td><td>&nbsp;</td><td>{{ address }}</td></tr>
-        <tr><td>Personal web page: </td><td>&nbsp;</td><td>{{ personalwebpage }}</td></tr>
-        <tr><td>Accept SciPost emails: </td><td>&nbsp;</td><td>{{ accepts_SciPost_emails }}</td></tr>
-        </table>
+            <table>
+            <tr><td>Title: </td><td>&nbsp;</td><td>{{ title }}</td></tr>
+            <tr><td>First name: </td><td>&nbsp;</td><td>{{ first_name }}</td></tr>
+            <tr><td>Last name: </td><td>&nbsp;</td><td>{{ last_name }}</td></tr>
+            <tr><td>Email: </td><td>&nbsp;</td><td>{{ email }}</td></tr>
+            <tr><td>ORCID id: </td><td>&nbsp;</td><td>{{ orcid_id }}</td></tr>
+            <tr><td>Country of employment: </td><td>&nbsp;</td>
+            <td>{{ country_of_employment }}</td></tr>
+            <tr><td>Affiliation: </td><td>&nbsp;</td><td>{{ affiliation }}</td></tr>
+            <tr><td>Address: </td><td>&nbsp;</td><td>{{ address }}</td></tr>
+            <tr><td>Personal web page: </td><td>&nbsp;</td><td>{{ personalwebpage }}</td></tr>
+            <tr><td>Accept SciPost emails: </td><td>&nbsp;</td><td>{{ accepts_SciPost_emails }}</td></tr>
+            </table>
         ''')
         context = Context({
             'title': title_dict[self.title],
@@ -258,21 +256,20 @@ class Contributor(models.Model):
         return template.render(context)
 
 
-    def public_info_as_table (self):
-        """
-        Prints out all publicly-accessible info as a table.
-        """
+    def public_info_as_table(self):
+        """Prints out all publicly-accessible info as a table."""
+        
         template = Template('''
-        <table>
-        <tr><td>Title: </td><td>&nbsp;</td><td>{{ title }}</td></tr>
-        <tr><td>First name: </td><td>&nbsp;</td><td>{{ first_name }}</td></tr>
-        <tr><td>Last name: </td><td>&nbsp;</td><td>{{ last_name }}</td></tr>
-        <tr><td>ORCID id: </td><td>&nbsp;</td><td>{{ orcid_id }}</td></tr>
-        <tr><td>Country of employment: </td><td>&nbsp;</td>
-        <td>{{ country_of_employment }}</td></tr>
-        <tr><td>Affiliation: </td><td>&nbsp;</td><td>{{ affiliation }}</td></tr>
-        <tr><td>Personal web page: </td><td>&nbsp;</td><td>{{ personalwebpage }}</td></tr>
-        </table>
+            <table>
+            <tr><td>Title: </td><td>&nbsp;</td><td>{{ title }}</td></tr>
+            <tr><td>First name: </td><td>&nbsp;</td><td>{{ first_name }}</td></tr>
+            <tr><td>Last name: </td><td>&nbsp;</td><td>{{ last_name }}</td></tr>
+            <tr><td>ORCID id: </td><td>&nbsp;</td><td>{{ orcid_id }}</td></tr>
+            <tr><td>Country of employment: </td><td>&nbsp;</td>
+            <td>{{ country_of_employment }}</td></tr>
+            <tr><td>Affiliation: </td><td>&nbsp;</td><td>{{ affiliation }}</td></tr>
+            <tr><td>Personal web page: </td><td>&nbsp;</td><td>{{ personalwebpage }}</td></tr>
+            </table>
         ''')
         context = Context({
                 'title': title_dict[self.title],
@@ -293,7 +290,7 @@ class Contributor(models.Model):
     def expertises_as_ul(self):
         output = '<ul>'
         for exp in self.expertises:
-            output += '<li>' + subject_areas_dict[exp] + '</li>'
+            output += '<li>%s</li>' % subject_areas_dict[exp]
         output += '</ul>'
         return mark_safe(output)
 
@@ -472,88 +469,6 @@ class AuthorshipClaim(models.Model):
     status = models.SmallIntegerField(choices=AUTHORSHIP_CLAIM_STATUS, default=0)
 
 
-
-#######################
-### Assessments objects
-#######################
-
-
-### Assessments
-
-#ASSESSMENT_CHOICES = (
-#    (101, '-'), # Only values between 0 and 100 are kept, anything outside limits is discarded.
-#    (100, 'top'), (80, 'high'), (60, 'good'), (40, 'ok'), (20, 'low'), (0, 'poor')
-#    )
-
-#class Assessment(models.Model):
-#    """
-#    Base class for all assessments.
-#    """
-#    rater = models.ForeignKey(Contributor, on_delete=models.CASCADE)
-#    submission = models.ForeignKey('submissions.Submission', on_delete=models.CASCADE, blank=True, null=True)
-#    comment = models.ForeignKey('comments.Comment', on_delete=models.CASCADE, blank=True, null=True)
-#    relevance = models.PositiveSmallIntegerField(choices=ASSESSMENT_CHOICES, default=101)
-#    importance = models.PositiveSmallIntegerField(choices=ASSESSMENT_CHOICES, default=101)
-#    clarity = models.PositiveSmallIntegerField(choices=ASSESSMENT_CHOICES, default=101)
-#    validity = models.PositiveSmallIntegerField(choices=ASSESSMENT_CHOICES, default=101)
-#    rigour = models.PositiveSmallIntegerField(choices=ASSESSMENT_CHOICES, default=101)
-#    originality = models.PositiveSmallIntegerField(choices=ASSESSMENT_CHOICES, default=101)
-#    significance = models.PositiveSmallIntegerField(choices=ASSESSMENT_CHOICES, default=101)
-
-
-### Opinions
-
-#OPINION_CHOICES = (
-#    ('ABS', '-'),
-#    ('A', 'agree'),
-#    ('N', 'not sure'),
-#    ('D', 'disagree'),
-#)
-#opinion_choices_dict = dict(OPINION_CHOICES)
-
-#class Opinion(models.Model):
-#    rater = models.ForeignKey(Contributor, on_delete=models.CASCADE)
-#    comment = models.ForeignKey('comments.Comment', on_delete=models.CASCADE)
-#    opinion = models.CharField(max_length=3, choices=OPINION_CHOICES, default='ABS')
-
-
-### AssessmentAggregates
-
-#class AssessmentAggregate(models.Model):
-#    """
-#    Aggregated assessments for an object.
-#    """
-#    nr = models.PositiveSmallIntegerField(default=0)
-#    nr_relevance_ratings = models.IntegerField(default=0)
-#    relevance_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0)
-#    nr_importance_ratings = models.IntegerField(default=0)
-#    importance_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0)
-#    nr_clarity_ratings = models.IntegerField(default=0)
-#    clarity_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0)
-#    nr_validity_ratings = models.IntegerField(default=0)
-#    validity_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0)
-#    nr_rigour_ratings = models.IntegerField(default=0)
-#    rigour_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0)
-#    nr_originality_ratings = models.IntegerField(default=0)
-#    originality_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0)
-#    nr_significance_ratings = models.IntegerField(default=0)
-#    significance_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0)
-
-
-##########
-# Emails #
-##########
-
-# class EmailedTo(models.Model):
-#     """
-#     An email address used for emailing.
-#     An instance is created by a method as send_precooked_email
-#     if the chosen message hasn't been sent to this address before.
-#     Helps prevent multiple emailing with same message.
-#     """
-#     email = models.EmailField()
-
-
 SCIPOST_FROM_ADDRESSES = (
     ('Admin', 'SciPost Admin <admin@scipost.org>'),
     ('J.-S. Caux', 'J.-S. Caux <jscaux@scipost.org>'),
@@ -572,7 +487,6 @@ class PrecookedEmail(models.Model):
     email_text = models.TextField()
     email_text_html = models.TextField()
     date_created = models.DateField(default=timezone.now)
-    #emailed_to = models.ManyToManyField(EmailedTo, blank=True)
     emailed_to = ArrayField(models.EmailField(blank=True), blank=True)
     date_last_used = models.DateField(default=timezone.now)
     deprecated = models.BooleanField(default=False)
@@ -661,8 +575,7 @@ class List(models.Model):
 
 
     def __str__(self):
-        return (self.title[:30] + ' (owner: ' + self.owner.user.first_name + ' '
-                + self.owner.user.last_name + ')')
+        return '%s (owner: %s %s)' % (self.title[:30], self.owner.user.first_name, self.owner.user.last_name)
 
 
     def header(self):
@@ -731,7 +644,7 @@ class Team(models.Model):
     Team of Contributors, to enable private collaborations.
     """
     leader = models.ForeignKey(Contributor, on_delete=models.CASCADE)
-    members = models.ManyToManyField (Contributor, blank=True, related_name='team_members')
+    members = models.ManyToManyField(Contributor, blank=True, related_name='team_members')
     name = models.CharField(max_length=100)
     established = models.DateField(default=timezone.now)
 
@@ -780,8 +693,7 @@ class Graph(models.Model):
 
 
     def __str__(self):
-        return (self.title[:30] + ' (owner: ' + self.owner.user.first_name + ' '
-                + self.owner.user.last_name + ')')
+        return '%s (owner: %s %s)' % (self.title[:30], self.owner.user.first_name, self.owner.user.last_name)
 
     def header_as_li(self):
         context = Context({'id': self.id, 'title': self.title,
diff --git a/scipost/templates/scipost/Fellow_activity_overview.html b/scipost/templates/scipost/Fellow_activity_overview.html
index 8609847ca..273de7c15 100644
--- a/scipost/templates/scipost/Fellow_activity_overview.html
+++ b/scipost/templates/scipost/Fellow_activity_overview.html
@@ -53,22 +53,22 @@
   <h4>Ongoing:</h4>
   <ul>
     {% for assignment in assignments_of_Fellow %}
-    {% if assignment.accepted and not assignment.completed %}
-    {% if request.user|is_not_author_of_submission:assignment.submission.arxiv_identifier_w_vn_nr %}
-    {{ assignment.header_as_li }}
-    {% endif %}
-    {% endif %}
+      {% if assignment.accepted and not assignment.completed %}
+        {% if request.user|is_not_author_of_submission:assignment.submission.arxiv_identifier_w_vn_nr %}
+          {{ assignment.header_as_li }}
+        {% endif %}
+      {% endif %}
     {% endfor %}
   </ul>
 
   <h4>Completed:</h4>
   <ul>
     {% for assignment in assignments_of_Fellow %}
-    {% if assignment.completed %}
-    {% if request.user|is_not_author_of_submission:assignment.submission.arxiv_identifier_w_vn_nr %}
-    {{ assignment.header_as_li }}
-    {% endif %}
-    {% endif %}
+      {% if assignment.completed %}
+        {% if request.user|is_not_author_of_submission:assignment.submission.arxiv_identifier_w_vn_nr %}
+          {{ assignment.header_as_li }}
+        {% endif %}
+      {% endif %}
     {% endfor %}
   </ul>
 
diff --git a/scipost/templates/scipost/about.html b/scipost/templates/scipost/about.html
index 774c01f4d..95b3c0522 100644
--- a/scipost/templates/scipost/about.html
+++ b/scipost/templates/scipost/about.html
@@ -11,11 +11,11 @@
   <div class="row">
     <div class="col-6">
       <div class="flex-container">
-	<div class="flex-greybox">
-	  <h1>About SciPost</h1>
-	</div>
+        <div class="flex-greybox">
+          <h1>About SciPost</h1>
+        </div>
       </div>
-<!--      <h4>Read the original <a href="{% static 'scipost/info/SciPost_Description.pdf' %}">SciPost description document</a>.</h4>  -->
+      {#<h4>Read the original <a href="{% static 'scipost/info/SciPost_Description.pdf' %}">SciPost description document</a>.</h4>#}
       <h4><a href="{% url 'scipost:FAQ' %}">Frequently asked questions</a>.</h4>
     </div>
     <div class="col-6">
@@ -38,12 +38,12 @@
   <div class="row">
     <div class="col-5">
       <ul>
-	<li><em>Two-way open access</em><br/> Publicly-funded science should be openly accessible to scientists and the general public, perpetually, worldwide. Conversely, scientists should not have to pay publishing charges to disseminate the fruits of their research efforts.</li>
-	<li><em>Non-profit</em><br/>Academics do not perform research for profit, and by extension the publication of their scientific results should not involve commercial profit-making.</li>
-	<li><em>By Professionals</em><br/> Scientists should carry the final responsibility for all stages in the scientific publishing process.</li>
-	<li><em>Peer-witnessed refereeing</em><br/> Scientific publications should undergo the strictest possible peer refereeing process, witnessed by the community instead of hidden behind closed doors.</li>
-	<li><em>Accountable and credited refereeing</em><br/> Peer refereeing should be accountable, and should be incentivized by being credited.</li>
-	<li><em>Post-publication evaluation</em><br/> Peer evaluation does not stop at the moment of publication.</li>
+        <li><em>Two-way open access</em><br/> Publicly-funded science should be openly accessible to scientists and the general public, perpetually, worldwide. Conversely, scientists should not have to pay publishing charges to disseminate the fruits of their research efforts.</li>
+        <li><em>Non-profit</em><br/>Academics do not perform research for profit, and by extension the publication of their scientific results should not involve commercial profit-making.</li>
+        <li><em>By Professionals</em><br/> Scientists should carry the final responsibility for all stages in the scientific publishing process.</li>
+        <li><em>Peer-witnessed refereeing</em><br/> Scientific publications should undergo the strictest possible peer refereeing process, witnessed by the community instead of hidden behind closed doors.</li>
+        <li><em>Accountable and credited refereeing</em><br/> Peer refereeing should be accountable, and should be incentivized by being credited.</li>
+        <li><em>Post-publication evaluation</em><br/> Peer evaluation does not stop at the moment of publication.</li>
       </ul>
     </div>
     <div class="col-1"></div>
diff --git a/scipost/templates/scipost/acknowledgement.html b/scipost/templates/scipost/acknowledgement.html
index 3aeb04cba..eda6a45b7 100644
--- a/scipost/templates/scipost/acknowledgement.html
+++ b/scipost/templates/scipost/acknowledgement.html
@@ -7,10 +7,10 @@
 <section>
   <h3>{{ ack_header }}</h3>
   {% if ack_message %}
-  <p>{{ ack_message }}</p>
+    <p>{{ ack_message }}</p>
   {% endif %}
   {% if followup_message %}
-  <p>{{ followup_message }} <a href="{{ followup_link }}">{{ followup_link_label }}</a>.</p>
+    <p>{{ followup_message }} <a href="{{ followup_link }}">{{ followup_link_label }}</a>.</p>
   {% endif %}
 </section>
 
diff --git a/scipost/templates/scipost/add_team_member.html b/scipost/templates/scipost/add_team_member.html
index a12e2c154..a8a592cc7 100644
--- a/scipost/templates/scipost/add_team_member.html
+++ b/scipost/templates/scipost/add_team_member.html
@@ -11,24 +11,27 @@
   </ul>
 
   {% if contributors_found %}
-  <h3>Identified as contributor:</h3>
-  <table>
-    {% for contributor in contributors_found %}
-    <tr><td>{{ contributor.user.first_name }} {{ contributor.user.last_name }}</td><td>&nbsp;</td>
-      <td><a href="{% url 'scipost:add_team_member' team_id=team.id contributor_id=contributor.id %}">Add to the Team</a></td></tr>
-    {% endfor %}
-  </table>
-  {% elif add_team_member_form.has_changed %}
-  <p>No Contributor with this last name could be identified.</p>
-  {% else %}
-  <p>Add a member to the Team:</p>
-  <form action="{% url 'scipost:add_team_member' team_id=team.id %}" method="post">
-    {% csrf_token %}
+    <h3>Identified as contributor:</h3>
     <table>
-      {{ add_team_member_form.as_table }}
+      {% for contributor in contributors_found %}
+        <tr>
+          <td>{{ contributor.user.first_name }} {{ contributor.user.last_name }}</td>
+          <td>&nbsp;</td>
+          <td><a href="{% url 'scipost:add_team_member' team_id=team.id contributor_id=contributor.id %}">Add to the Team</a></td>
+        </tr>
+      {% endfor %}
     </table>
-    <input type="submit" value="Search" />
-  </form>
+  {% elif add_team_member_form.has_changed %}
+    <p>No Contributor with this last name could be identified.</p>
+  {% else %}
+    <p>Add a member to the Team:</p>
+    <form action="{% url 'scipost:add_team_member' team_id=team.id %}" method="post">
+      {% csrf_token %}
+      <table>
+        {{ add_team_member_form.as_table }}
+      </table>
+      <input type="submit" value="Search" />
+    </form>
   {% endif %}
 
 
diff --git a/scipost/templates/scipost/change_password.html b/scipost/templates/scipost/change_password.html
index 269c95f68..23648dedd 100644
--- a/scipost/templates/scipost/change_password.html
+++ b/scipost/templates/scipost/change_password.html
@@ -5,26 +5,25 @@
 {% block bodysup %}
 
 {% if ack %}
-<section>
-  <h1>Your SciPost password has been successfully changed</h1>
-</section>
-
+  <section>
+    <h1>Your SciPost password has been successfully changed</h1>
+  </section>
 {% else %}
-<section>
-  <h1>Change your SciPost password</h1>
-  <form action="{% url 'scipost:change_password' %}" method="post">
-    {% csrf_token %}
-    <table>
-      <ul>
-	{{ form.as_table }}
-      </ul>
-    </table>
-    <input type="submit" value="Change" />
-  </form>
-  {% if errormessage %}
-  <p>{{ errormessage }}</p>
-  {% endif %}
-</section>
+  <section>
+    <h1>Change your SciPost password</h1>
+    <form action="{% url 'scipost:change_password' %}" method="post">
+      {% csrf_token %}
+      <table>
+        <ul>
+      {{ form.as_table }}
+        </ul>
+      </table>
+      <input type="submit" value="Change" />
+    </form>
+    {% if errormessage %}
+      <p>{{ errormessage }}</p>
+    {% endif %}
+  </section>
 {% endif %}
 
 {% endblock bodysup %}
diff --git a/scipost/templates/scipost/claim_authorships.html b/scipost/templates/scipost/claim_authorships.html
index fc6b6e81d..fb2e0c33e 100644
--- a/scipost/templates/scipost/claim_authorships.html
+++ b/scipost/templates/scipost/claim_authorships.html
@@ -14,71 +14,71 @@
   </div>
 
   {% if submission_authorships_to_claim %}
-  <hr class="hr12">
-  <div class="flex-greybox">
-    <h1>SciPost Submissions</h1>
-  </div>
-  <h3>Potential authorships to claim (auto-detected)</h3>
-  <ul>
-    {% for sub in submission_authorships_to_claim %}
-    {{ sub.header_as_li }}
-    <form action="{% url 'scipost:claim_sub_authorship' submission_id=sub.id claim=1%}" method="post">
-      {% csrf_token %}
-      <input type="submit" value="I am an author" />
-    </form>
-    <form action="{% url 'scipost:claim_sub_authorship' submission_id=sub.id claim=0%}" method="post">
-      {% csrf_token %}
-      <input type="submit" value="I am not an author" />
-    </form>
-    {% endfor %}
-  </ul>
+    <hr class="hr12">
+    <div class="flex-greybox">
+      <h1>SciPost Submissions</h1>
+    </div>
+    <h3>Potential authorships to claim (auto-detected)</h3>
+    <ul>
+      {% for sub in submission_authorships_to_claim %}
+        {{ sub.header_as_li }}
+        <form action="{% url 'scipost:claim_sub_authorship' submission_id=sub.id claim=1%}" method="post">
+          {% csrf_token %}
+          <input type="submit" value="I am an author" />
+        </form>
+        <form action="{% url 'scipost:claim_sub_authorship' submission_id=sub.id claim=0%}" method="post">
+          {% csrf_token %}
+          <input type="submit" value="I am not an author" />
+        </form>
+      {% endfor %}
+    </ul>
   {% endif %}
 
   {% if commentary_authorships_to_claim %}
-  <hr class="hr12">
-  <div class="flex-greybox">
-    <h1>SciPost Commentaries</h1>
-  </div>
-  <h3>Potential authorships to claim (auto-detected)</h3>
-  <ul>
-    {% for com in commentary_authorships_to_claim %}
-    {{ com.header_as_li }}
-    <form action="{% url 'scipost:claim_com_authorship' commentary_id=com.id claim=1%}" method="post">
-      {% csrf_token %}
-      <input type="submit" value="I am an author" />
-    </form>
-    <form action="{% url 'scipost:claim_com_authorship' commentary_id=com.id claim=0%}" method="post">
-      {% csrf_token %}
-      <input type="submit" value="I am not an author" />
-    </form>
-    {% endfor %}
-  </ul>
+    <hr class="hr12">
+    <div class="flex-greybox">
+      <h1>SciPost Commentaries</h1>
+    </div>
+    <h3>Potential authorships to claim (auto-detected)</h3>
+    <ul>
+      {% for com in commentary_authorships_to_claim %}
+        {{ com.header_as_li }}
+        <form action="{% url 'scipost:claim_com_authorship' commentary_id=com.id claim=1%}" method="post">
+          {% csrf_token %}
+          <input type="submit" value="I am an author" />
+        </form>
+        <form action="{% url 'scipost:claim_com_authorship' commentary_id=com.id claim=0%}" method="post">
+          {% csrf_token %}
+          <input type="submit" value="I am not an author" />
+        </form>
+      {% endfor %}
+    </ul>
   {% endif %}
 
   {% if thesis_authorships_to_claim %}
-  <hr class="hr12">
-  <div class="flex-greybox">
-    <h1>SciPost Thesis Links</h1>
-  </div>
-  <h3>Potential authorships to claim (auto-detected)</h3>
-  <ul>
-    {% for thesis in thesis_authorships_to_claim %}
-    {{ thesis.header_as_li }}
-    <form action="{% url 'scipost:claim_thesis_authorship' thesis_id=thesis.id claim=1%}" method="post">
-      {% csrf_token %}
-      <input type="submit" value="I am an author" />
-    </form>
-    <form action="{% url 'scipost:claim_thesis_authorship' thesis_id=thesis.id claim=0%}" method="post">
-      {% csrf_token %}
-      <input type="submit" value="I am not an author" />
-    </form>
-    {% endfor %}
-  </ul>
+    <hr class="hr12">
+    <div class="flex-greybox">
+      <h1>SciPost Thesis Links</h1>
+    </div>
+    <h3>Potential authorships to claim (auto-detected)</h3>
+    <ul>
+      {% for thesis in thesis_authorships_to_claim %}
+        {{ thesis.header_as_li }}
+        <form action="{% url 'scipost:claim_thesis_authorship' thesis_id=thesis.id claim=1%}" method="post">
+          {% csrf_token %}
+          <input type="submit" value="I am an author" />
+        </form>
+        <form action="{% url 'scipost:claim_thesis_authorship' thesis_id=thesis.id claim=0%}" method="post">
+          {% csrf_token %}
+          <input type="submit" value="I am not an author" />
+        </form>
+      {% endfor %}
+    </ul>
   {% endif %}
 
   {% if not submission_authorships_to_claim and not commentary_authorships_to_claim and not thesis_authorships_to_claim %}
-  <hr class="hr12">
-  <h1>You have no authorships to claim</h1>
+    <hr class="hr12">
+    <h1>You have no authorships to claim</h1>
   {% endif %}
 
 </section>
diff --git a/scipost/templates/scipost/comments_block.html b/scipost/templates/scipost/comments_block.html
index f37f9b939..ca093f166 100644
--- a/scipost/templates/scipost/comments_block.html
+++ b/scipost/templates/scipost/comments_block.html
@@ -1,118 +1,118 @@
 {% load scipost_extras %}
 {% if comments %}
-<section>
-  <hr class="hr12">
-  <div class="flex-greybox">
-    <h2>Comments on this publication</h2>
-    <button id="commentsbutton">Toggle comments view</button>
-  </div>
+  <section>
+    <hr class="hr12">
+    <div class="flex-greybox">
+      <h2>Comments on this publication</h2>
+      <button id="commentsbutton">Toggle comments view</button>
+    </div>
 
-  <div id="commentslist">
-    {% for comment in comments %}
+    <div id="commentslist">
+      {% for comment in comments %}
 
-    <hr class="hr6">
+          <hr class="hr6">
 
-    <div class="flex-container">
-      <div class="flex-commentbox">
-        {{ comment.print_identifier }}
-        {{ comment.categories_as_ul }}
-        <div class="opinionsDisplay">
-          {% if user.is_authenticated and perms.scipost.can_express_opinion_on_comments %}
-	  {% if user.contributor != comment.author %}
-	  <form action="{% url 'comments:express_opinion' comment_id=comment.id opinion='A' %}" method="post">
-	    {% csrf_token %}
-	    <input type="submit" class="agree" value="Agree {{ comment.nr_A }} "/>
-	  </form>
-	  <form action="{% url 'comments:express_opinion' comment_id=comment.id opinion='N' %}" method="post">
-	    {% csrf_token %}
-	    <input type="submit" class="notsure" value="Not sure {{ comment.nr_N }}"/>
-	  </form>
-	  <form action="{% url 'comments:express_opinion' comment_id=comment.id opinion='D'%}" method="post">
-	    {% csrf_token %}
-	    <input type="submit" class="disagree" value="Disagree {{ comment.nr_D }}"/>
-	  </form>
-	  {% else %}
-	  {{ comment.opinions_as_ul }}
-	  {% endif %}
-          {% endif %}
-        </div>
-      </div>
-    </div>
+          <div class="flex-container">
+            <div class="flex-commentbox">
+              {{ comment.print_identifier }}
+              {{ comment.categories_as_ul }}
+              <div class="opinionsDisplay">
+                {% if user.is_authenticated and perms.scipost.can_express_opinion_on_comments %}
+                  {% if user.contributor != comment.author %}
+                    <form action="{% url 'comments:express_opinion' comment_id=comment.id opinion='A' %}" method="post">
+                      {% csrf_token %}
+                      <input type="submit" class="agree" value="Agree {{ comment.nr_A }} "/>
+                    </form>
+                    <form action="{% url 'comments:express_opinion' comment_id=comment.id opinion='N' %}" method="post">
+                      {% csrf_token %}
+                      <input type="submit" class="notsure" value="Not sure {{ comment.nr_N }}"/>
+                    </form>
+                    <form action="{% url 'comments:express_opinion' comment_id=comment.id opinion='D'%}" method="post">
+                      {% csrf_token %}
+                      <input type="submit" class="disagree" value="Disagree {{ comment.nr_D }}"/>
+                    </form>
+                  {% else %}
+                    {{ comment.opinions_as_ul }}
+                  {% endif %}
+                {% endif %}
+              </div>
+            </div>
+          </div>
 
 
-    <div class="row">
-      <div class="col-1"></div>
-      <div class="col-10">
-	<p>{{ comment.comment_text|linebreaks }}</p>
-	{% if user|is_in_group:'Editorial College' or user|is_in_group:'Editorial Administrators' %}
-	<h3>Remarks for editors:</h3>
-	<p>{{ comment.remarks_for_editors|linebreaks }}</p>
-	{% endif %}
-      </div>
-    </div>
+          <div class="row">
+            <div class="col-1"></div>
+            <div class="col-10">
+          <p>{{ comment.comment_text|linebreaks }}</p>
+          {% if user|is_in_group:'Editorial College' or user|is_in_group:'Editorial Administrators' %}
+            <h3>Remarks for editors:</h3>
+            <p>{{ comment.remarks_for_editors|linebreaks }}</p>
+          {% endif %}
+            </div>
+          </div>
 
-    {% for reply in author_replies %}
-    {% if reply.in_reply_to_comment %}
-    {% if reply.in_reply_to_comment.id == comment.id %}
-    <div class="row">
-      <div class="col-1"></div>
-      <hr style="border-style: dotted;" />
+          {% for reply in author_replies %}
+            {% if reply.in_reply_to_comment %}
+              {% if reply.in_reply_to_comment.id == comment.id %}
+              <div class="row">
+                <div class="col-1"></div>
+                <hr style="border-style: dotted;" />
 
-      <div class="flex-container">
-	<div class="flex-commentbox">
-          {{ reply.print_identifier }}
-          {{ reply.categories_as_ul }}
-          <div class="opinionsDisplay">
-            {% if user.is_authenticated and perms.scipost.can_express_opinion_on_comments %}
-	    {% if user.contributor != reply.author %}
-	    <form action="{% url 'comments:express_opinion' comment_id=reply.id opinion='A' %}" method="post">
-	      {% csrf_token %}
-	      <input type="submit" class="agree" value="Agree {{ reply.nr_A }} "/>
-	    </form>
-	    <form action="{% url 'comments:express_opinion' comment_id=reply.id opinion='N' %}" method="post">
-	      {% csrf_token %}
-	      <input type="submit" class="notsure" value="Not sure {{ reply.nr_N }}"/>
-	    </form>
-	    <form action="{% url 'comments:express_opinion' comment_id=reply.id opinion='D'%}" method="post">
-	      {% csrf_token %}
-	      <input type="submit" class="disagree" value="Disagree {{ reply.nr_D }}"/>
-	    </form>
-	    {% else %}
-	    {{ reply.opinions_as_ul }}
-	    {% endif %}
-            {% endif %}
-          </div>
-	</div>
-      </div>
-    </div>
-    <div class="row">
-      <div class="col-1"></div>
-      <div class="col-10">
-	<p>{{ reply.comment_text|linebreaks }}</p>
-	{% if user|is_in_group:'Editorial College' or user|is_in_group:'Editorial Administrators' %}
-	<h3>Remarks for editors:</h3>
-	<p>{{ reply.remarks_for_editors|linebreaks }}</p>
-	{% endif %}
-      </div>
-    </div>
+                <div class="flex-container">
+              <div class="flex-commentbox">
+                    {{ reply.print_identifier }}
+                    {{ reply.categories_as_ul }}
+                    <div class="opinionsDisplay">
+                      {% if user.is_authenticated and perms.scipost.can_express_opinion_on_comments %}
+                  {% if user.contributor != reply.author %}
+                  <form action="{% url 'comments:express_opinion' comment_id=reply.id opinion='A' %}" method="post">
+                    {% csrf_token %}
+                    <input type="submit" class="agree" value="Agree {{ reply.nr_A }} "/>
+                  </form>
+                  <form action="{% url 'comments:express_opinion' comment_id=reply.id opinion='N' %}" method="post">
+                    {% csrf_token %}
+                    <input type="submit" class="notsure" value="Not sure {{ reply.nr_N }}"/>
+                  </form>
+                  <form action="{% url 'comments:express_opinion' comment_id=reply.id opinion='D'%}" method="post">
+                    {% csrf_token %}
+                    <input type="submit" class="disagree" value="Disagree {{ reply.nr_D }}"/>
+                  </form>
+                  {% else %}
+                    {{ reply.opinions_as_ul }}
+                  {% endif %}
+                      {% endif %}
+                    </div>
+              </div>
+                </div>
+              </div>
+              <div class="row">
+                <div class="col-1"></div>
+                <div class="col-10">
+              <p>{{ reply.comment_text|linebreaks }}</p>
+              {% if user|is_in_group:'Editorial College' or user|is_in_group:'Editorial Administrators' %}
+                <h3>Remarks for editors:</h3>
+                <p>{{ reply.remarks_for_editors|linebreaks }}</p>
+              {% endif %}
+                </div>
+              </div>
 
-    {% endif %}
-    {% endif %}
-    {% endfor %}
+              {% endif %}
+            {% endif %}
+          {% endfor %}
 
-    {% if user.is_authenticated and perms.scipost.can_submit_comments %}
-    <div class="row">
-      <div class="col-1"></div>
-      <hr class="hr6"/>
-    </div>
-    <div class="row">
-      <div class="col-1"></div>
-      <div class="col-5">
-	<h3><a href="{% url 'comments:reply_to_comment' comment_id=comment.id %}">Reply to this comment</a></h3>
-      </div>
+        {% if user.is_authenticated and perms.scipost.can_submit_comments %}
+          <div class="row">
+            <div class="col-1"></div>
+            <hr class="hr6"/>
+          </div>
+          <div class="row">
+            <div class="col-1"></div>
+            <div class="col-5">
+          <h3><a href="{% url 'comments:reply_to_comment' comment_id=comment.id %}">Reply to this comment</a></h3>
+            </div>
+          </div>
+        {% endif %}
+      {% endfor %}
     </div>
-    {% endif %}
-    {% endfor %}
-  </div id="commentslist">
-</section>
+  </section>
 {% endif %}
diff --git a/scipost/templates/scipost/contributor_info.html b/scipost/templates/scipost/contributor_info.html
index 3e0ad9e73..1f6bde0d3 100644
--- a/scipost/templates/scipost/contributor_info.html
+++ b/scipost/templates/scipost/contributor_info.html
@@ -49,7 +49,7 @@
     <h3>Publications for which this Contributor is identified as an author:</h3>
     <ul>
       {% for pub in contributor_publications %}
-      {{ pub.header_as_li }}
+        {{ pub.header_as_li }}
       {% endfor %}
     </ul>
   </div>
@@ -67,7 +67,7 @@
     <h3>Submissions for which this Contributor is identified as an author:</h3>
     <ul>
       {% for sub in contributor_submissions %}
-      {{ sub.header_as_li }}
+        {{ sub.header_as_li }}
       {% endfor %}
     </ul>
   </div>
@@ -85,7 +85,7 @@
     <h3>Commentaries for which this Contributor is identified as an author:</h3>
     <ul>
       {% for com in contributor_commentaries %}
-      {{ com.header_as_li }}
+        {{ com.header_as_li }}
       {% endfor %}
     </ul>
   </div>
@@ -103,7 +103,7 @@
     <h3>Theses for which this Contributor is identified as an author:</h3>
     <ul>
       {% for thesis in contributor_theses %}
-      {{ thesis.header_as_li }}
+        {{ thesis.header_as_li }}
       {% endfor %}
     </ul>
   </div>
@@ -120,7 +120,7 @@
   <div id="mycommentslist">
     <ul>
       {% for comment in contributor_comments %}
-      {{ comment.header_as_li }}
+        {{ comment.header_as_li }}
       {% endfor %}
     </ul>
   </div>
@@ -137,7 +137,7 @@
   <div id="myauthorreplieslist">
     <ul>
       {% for reply in contributor_authorreplies %}
-      {{ reply.header_as_li }}
+        {{ reply.header_as_li }}
       {% endfor %}
     </ul>
   </div>
diff --git a/scipost/templates/scipost/create_graph.html b/scipost/templates/scipost/create_graph.html
index 0a731d807..e3c4bc54d 100644
--- a/scipost/templates/scipost/create_graph.html
+++ b/scipost/templates/scipost/create_graph.html
@@ -6,7 +6,7 @@
 
 <section>
   {% if graphcreated %}
-  <p>{{ message }}</p>
+    <p>{{ message }}</p>
   {% else %}
   <h1>Create a new Graph</h1>
   <form action="{% url 'scipost:create_graph' %}" method="post">
diff --git a/scipost/templates/scipost/draft_registration_invitation.html b/scipost/templates/scipost/draft_registration_invitation.html
index 02d8ceeff..6c73c5ec6 100644
--- a/scipost/templates/scipost/draft_registration_invitation.html
+++ b/scipost/templates/scipost/draft_registration_invitation.html
@@ -41,7 +41,7 @@
     <h2>Draft a new invitation:</h2>
   </div>
   {% if errormessage %}
-  <h3 style="color: red;">{{ errormessage }}</h3>
+    <h3 style="color: red;">{{ errormessage }}</h3>
   {% endif %}
   <form action="{% url 'scipost:draft_registration_invitation' %}" method="post">
     {% csrf_token %}
@@ -57,14 +57,14 @@
   <table class="tableofInvitees">
     <tr><td>Last name</td><td>First name</td><td>Email</td><td>Date drafted</td><td>Type</td><td>Drafted by</td></tr>
     {% for draft in existing_drafts %}
-    <tr>
-      <td>{{ draft.last_name }}</td>
-      <td>{{ draft.first_name }}</td>
-      <td>{{ draft.email }}</td>
-      <td>{{ draft.date_drafted }} </td>
-      <td>{{ draft.invitation_type }}</td>
-      <td>{{ draft.drafted_by.user.last_name }}</td>
-    </tr>
+      <tr>
+        <td>{{ draft.last_name }}</td>
+        <td>{{ draft.first_name }}</td>
+        <td>{{ draft.email }}</td>
+        <td>{{ draft.date_drafted }} </td>
+        <td>{{ draft.invitation_type }}</td>
+        <td>{{ draft.drafted_by.user.last_name }}</td>
+      </tr>
     {% endfor %}
   </table>
 </section>
@@ -78,14 +78,14 @@
   <table class="tableofInvitees">
     <tr><td>Last name</td><td>First name</td><td>Email</td><td>Date sent</td><td>Type</td><td>Invited by</td></tr>
     {% for fellow in sent_reg_inv_fellows %}
-    <tr>
-      <td>{{ fellow.last_name }}</td>
-      <td>{{ fellow.first_name }}</td>
-      <td>{{ fellow.email }}</td>
-      <td>{{ fellow.date_sent }} </td>
-      <td>{{ fellow.invitation_type }}</td>
-      <td>{{ fellow.invited_by.user.last_name }}</td>
-    </tr>
+      <tr>
+        <td>{{ fellow.last_name }}</td>
+        <td>{{ fellow.first_name }}</td>
+        <td>{{ fellow.email }}</td>
+        <td>{{ fellow.date_sent }} </td>
+        <td>{{ fellow.invitation_type }}</td>
+        <td>{{ fellow.invited_by.user.last_name }}</td>
+      </tr>
     {% endfor %}
   </table>
   <hr class="hr6"/>
@@ -93,14 +93,14 @@
   <table class="tableofInvitees">
     <tr><td>Last name</td><td>First name</td><td>Email</td><td>Date sent</td><td>Type</td><td>Invited by</td></tr>
     {% for fellow in sent_reg_inv_contrib %}
-    <tr>
-      <td>{{ fellow.last_name }}</td>
-      <td>{{ fellow.first_name }}</td>
-      <td>{{ fellow.email }}</td>
-      <td>{{ fellow.date_sent }} </td>
-      <td>{{ fellow.invitation_type }}</td>
-      <td>{{ fellow.invited_by.user.last_name }}</td>
-    </tr>
+      <tr>
+        <td>{{ fellow.last_name }}</td>
+        <td>{{ fellow.first_name }}</td>
+        <td>{{ fellow.email }}</td>
+        <td>{{ fellow.date_sent }} </td>
+        <td>{{ fellow.invitation_type }}</td>
+        <td>{{ fellow.invited_by.user.last_name }}</td>
+      </tr>
     {% endfor %}
   </table>
   <hr class="hr6"/>
@@ -108,14 +108,14 @@
   <table class="tableofInvitees">
     <tr><td>Last name</td><td>First name</td><td>Email</td><td>Date sent</td><td>Type</td><td>Invited by</td></tr>
     {% for fellow in sent_reg_inv_ref %}
-    <tr>
-      <td>{{ fellow.last_name }}</td>
-      <td>{{ fellow.first_name }}</td>
-      <td>{{ fellow.email }}</td>
-      <td>{{ fellow.date_sent }} </td>
-      <td>{{ fellow.invitation_type }}</td>
-      <td>{{ fellow.invited_by.user.last_name }}</td>
-    </tr>
+      <tr>
+        <td>{{ fellow.last_name }}</td>
+        <td>{{ fellow.first_name }}</td>
+        <td>{{ fellow.email }}</td>
+        <td>{{ fellow.date_sent }} </td>
+        <td>{{ fellow.invitation_type }}</td>
+        <td>{{ fellow.invited_by.user.last_name }}</td>
+      </tr>
     {% endfor %}
   </table>
   <hr class="hr6"/>
@@ -123,14 +123,14 @@
   <table class="tableofInvitees">
     <tr><td>Last name</td><td>First name</td><td>Email</td><td>Date sent</td><td>Type</td><td>Invited by</td></tr>
     {% for fellow in sent_reg_inv_cited_sub %}
-    <tr>
-      <td>{{ fellow.last_name }}</td>
-      <td>{{ fellow.first_name }}</td>
-      <td>{{ fellow.email }}</td>
-      <td>{{ fellow.date_sent }} </td>
-      <td>{{ fellow.invitation_type }}</td>
-      <td>{{ fellow.invited_by.user.last_name }}</td>
-    </tr>
+      <tr>
+        <td>{{ fellow.last_name }}</td>
+        <td>{{ fellow.first_name }}</td>
+        <td>{{ fellow.email }}</td>
+        <td>{{ fellow.date_sent }} </td>
+        <td>{{ fellow.invitation_type }}</td>
+        <td>{{ fellow.invited_by.user.last_name }}</td>
+      </tr>
     {% endfor %}
   </table>
   <hr class="hr6"/>
@@ -138,14 +138,14 @@
   <table class="tableofInvitees">
     <tr><td>Last name</td><td>First name</td><td>Email</td><td>Date sent</td><td>Type</td><td>Invited by</td></tr>
     {% for fellow in sent_reg_inv_cited_pub %}
-    <tr>
-      <td>{{ fellow.last_name }}</td>
-      <td>{{ fellow.first_name }}</td>
-      <td>{{ fellow.email }}</td>
-      <td>{{ fellow.date_sent }} </td>
-      <td>{{ fellow.invitation_type }}</td>
-      <td>{{ fellow.invited_by.user.last_name }}</td>
-    </tr>
+      <tr>
+        <td>{{ fellow.last_name }}</td>
+        <td>{{ fellow.first_name }}</td>
+        <td>{{ fellow.email }}</td>
+        <td>{{ fellow.date_sent }} </td>
+        <td>{{ fellow.invitation_type }}</td>
+        <td>{{ fellow.invited_by.user.last_name }}</td>
+      </tr>
     {% endfor %}
   </table>
 </section>
@@ -159,14 +159,14 @@
   <table class="tableofInviteesResponded">
     <tr><td>Last name</td><td>First name</td><td>Email</td><td>Date sent</td><td>Type</td><td>Invited by</td></tr>
     {% for fellow in resp_reg_inv_fellows %}
-    <tr>
-      <td>{{ fellow.last_name }}</td>
-      <td>{{ fellow.first_name }}</td>
-      <td>{{ fellow.email }}</td>
-      <td>{{ fellow.date_sent }} </td>
-      <td>{{ fellow.invitation_type }}</td>
-      <td>{{ fellow.invited_by.user.last_name }}</td>
-    </tr>
+      <tr>
+        <td>{{ fellow.last_name }}</td>
+        <td>{{ fellow.first_name }}</td>
+        <td>{{ fellow.email }}</td>
+        <td>{{ fellow.date_sent }} </td>
+        <td>{{ fellow.invitation_type }}</td>
+        <td>{{ fellow.invited_by.user.last_name }}</td>
+      </tr>
     {% endfor %}
   </table>
   <hr class="hr6"/>
@@ -174,14 +174,14 @@
   <table class="tableofInviteesResponded">
     <tr><td>Last name</td><td>First name</td><td>Email</td><td>Date sent</td><td>Type</td><td>Invited by</td></tr>
     {% for fellow in resp_reg_inv_contrib %}
-    <tr>
-      <td>{{ fellow.last_name }}</td>
-      <td>{{ fellow.first_name }}</td>
-      <td>{{ fellow.email }}</td>
-      <td>{{ fellow.date_sent }} </td>
-      <td>{{ fellow.invitation_type }}</td>
-      <td>{{ fellow.invited_by.user.last_name }}</td>
-    </tr>
+      <tr>
+        <td>{{ fellow.last_name }}</td>
+        <td>{{ fellow.first_name }}</td>
+        <td>{{ fellow.email }}</td>
+        <td>{{ fellow.date_sent }} </td>
+        <td>{{ fellow.invitation_type }}</td>
+        <td>{{ fellow.invited_by.user.last_name }}</td>
+      </tr>
     {% endfor %}
   </table>
 
@@ -190,14 +190,14 @@
   <table class="tableofInviteesResponded">
     <tr><td>Last name</td><td>First name</td><td>Email</td><td>Date sent</td><td>Type</td><td>Invited by</td></tr>
     {% for fellow in resp_reg_inv_ref %}
-    <tr>
-      <td>{{ fellow.last_name }}</td>
-      <td>{{ fellow.first_name }}</td>
-      <td>{{ fellow.email }}</td>
-      <td>{{ fellow.date_sent }} </td>
-      <td>{{ fellow.invitation_type }}</td>
-      <td>{{ fellow.invited_by.user.last_name }}</td>
-    </tr>
+      <tr>
+        <td>{{ fellow.last_name }}</td>
+        <td>{{ fellow.first_name }}</td>
+        <td>{{ fellow.email }}</td>
+        <td>{{ fellow.date_sent }} </td>
+        <td>{{ fellow.invitation_type }}</td>
+        <td>{{ fellow.invited_by.user.last_name }}</td>
+      </tr>
     {% endfor %}
   </table>
 
@@ -206,14 +206,14 @@
   <table class="tableofInviteesResponded">
     <tr><td>Last name</td><td>First name</td><td>Email</td><td>Date sent</td><td>Type</td><td>Invited by</td></tr>
     {% for fellow in resp_reg_inv_cited_sub %}
-    <tr>
-      <td>{{ fellow.last_name }}</td>
-      <td>{{ fellow.first_name }}</td>
-      <td>{{ fellow.email }}</td>
-      <td>{{ fellow.date_sent }} </td>
-      <td>{{ fellow.invitation_type }}</td>
-      <td>{{ fellow.invited_by.user.last_name }}</td>
-    </tr>
+      <tr>
+        <td>{{ fellow.last_name }}</td>
+        <td>{{ fellow.first_name }}</td>
+        <td>{{ fellow.email }}</td>
+        <td>{{ fellow.date_sent }} </td>
+        <td>{{ fellow.invitation_type }}</td>
+        <td>{{ fellow.invited_by.user.last_name }}</td>
+      </tr>
     {% endfor %}
   </table>
 
@@ -222,14 +222,14 @@
   <table class="tableofInviteesResponded">
     <tr><td>Last name</td><td>First name</td><td>Email</td><td>Date sent</td><td>Type</td><td>Invited by</td></tr>
     {% for fellow in resp_reg_inv_cited_pub %}
-    <tr>
-      <td>{{ fellow.last_name }}</td>
-      <td>{{ fellow.first_name }}</td>
-      <td>{{ fellow.email }}</td>
-      <td>{{ fellow.date_sent }} </td>
-      <td>{{ fellow.invitation_type }}</td>
-      <td>{{ fellow.invited_by.user.last_name }}</td>
-    </tr>
+      <tr>
+        <td>{{ fellow.last_name }}</td>
+        <td>{{ fellow.first_name }}</td>
+        <td>{{ fellow.email }}</td>
+        <td>{{ fellow.date_sent }} </td>
+        <td>{{ fellow.invitation_type }}</td>
+        <td>{{ fellow.invited_by.user.last_name }}</td>
+      </tr>
     {% endfor %}
   </table>
 
@@ -238,14 +238,14 @@
   <table class="tableofInviteesDeclined">
     <tr><td>Last name</td><td>First name</td><td>Email</td><td>Date sent</td><td>Type</td><td>Invited by</td></tr>
     {% for fellow in decl_reg_inv %}
-    <tr>
-      <td>{{ fellow.last_name }}</td>
-      <td>{{ fellow.first_name }}</td>
-      <td>{{ fellow.email }}</td>
-      <td>{{ fellow.date_sent }} </td>
-      <td>{{ fellow.invitation_type }}</td>
-      <td>{{ fellow.invited_by.user.last_name }}</td>
-    </tr>
+      <tr>
+        <td>{{ fellow.last_name }}</td>
+        <td>{{ fellow.first_name }}</td>
+        <td>{{ fellow.email }}</td>
+        <td>{{ fellow.date_sent }} </td>
+        <td>{{ fellow.invitation_type }}</td>
+        <td>{{ fellow.invited_by.user.last_name }}</td>
+      </tr>
     {% endfor %}
   </table>
 
@@ -260,7 +260,7 @@
   </div>
   <p>
     {% for first_name, last_name in names_reg_contributors %}
-    {{ first_name }} {{ last_name }},&nbsp;
+      {{ first_name }} {{ last_name }},&nbsp;
     {% endfor %}
   </p>
 </section>
diff --git a/scipost/templates/scipost/edit_invitation_personal_message.html b/scipost/templates/scipost/edit_invitation_personal_message.html
index 24d3316f0..c66d52693 100644
--- a/scipost/templates/scipost/edit_invitation_personal_message.html
+++ b/scipost/templates/scipost/edit_invitation_personal_message.html
@@ -11,7 +11,7 @@
     <h2>Edit invitation's personal message: for {{ invitation.first_name }} {{ invitation.last_name }}</h2>
   </div>
   {% if errormessage %}
-  <h3 style="color: red;">{{ errormessage }}</h3>
+    <h3 style="color: red;">{{ errormessage }}</h3>
   {% endif %}
   <form action="{% url 'scipost:edit_invitation_personal_message' invitation_id=invitation.id %}" method="post">
     {% csrf_token %}
diff --git a/scipost/templates/scipost/email_group_members.html b/scipost/templates/scipost/email_group_members.html
index f7ddaaa73..9342b9e42 100644
--- a/scipost/templates/scipost/email_group_members.html
+++ b/scipost/templates/scipost/email_group_members.html
@@ -12,7 +12,7 @@
 
 <section>
   {% if errormessage %}
-  <p>{{ errormessage }}</p>
+    <p>{{ errormessage }}</p>
   {% endif %}
   <div class="flex-greybox">
     <h1>Email a Group of Contributors</h1>
diff --git a/scipost/templates/scipost/email_particular.html b/scipost/templates/scipost/email_particular.html
index 2c4523a6a..f6a3e8cde 100644
--- a/scipost/templates/scipost/email_particular.html
+++ b/scipost/templates/scipost/email_particular.html
@@ -12,7 +12,7 @@
 
 <section>
   {% if errormessage %}
-  <p>{{ errormessage }}</p>
+    <p>{{ errormessage }}</p>
   {% else %}
   <div class="flex-greybox">
     <h1>Email a particular</h1>
diff --git a/scipost/templates/scipost/index.html b/scipost/templates/scipost/index.html
index c98481db5..d303224f7 100644
--- a/scipost/templates/scipost/index.html
+++ b/scipost/templates/scipost/index.html
@@ -8,16 +8,16 @@
 <section>
   <div class="flex-container">
     {% if latest_newsitems %}
-    <div class="flex-greybox320">
-      <h1><a href="{% url 'scipost:news' %}">News</a><a style="float: right;" href="{% url 'scipost:feeds' %}"><img src="{% static 'scipost/images/feed-icon-14x14.png' %}" alt="Feed logo" width="14"></a></h1>
-      <p>Latest news and announcements.</p>
-      <hr class="hr6"/>
-      <ul class="NewsItemsList">
-	{% for item in latest_newsitems %}
-	<li>{{ item.descriptor_small|linebreaks }}</li>
-	{% endfor %}
-      </ul>
-    </div>
+      <div class="flex-greybox320">
+        <h1><a href="{% url 'scipost:news' %}">News</a><a style="float: right;" href="{% url 'scipost:feeds' %}"><img src="{% static 'scipost/images/feed-icon-14x14.png' %}" alt="Feed logo" width="14"></a></h1>
+        <p>Latest news and announcements.</p>
+        <hr class="hr6"/>
+        <ul class="NewsItemsList">
+      {% for item in latest_newsitems %}
+        <li>{{ item.descriptor_small|linebreaks }}</li>
+      {% endfor %}
+        </ul>
+      </div>
     {% endif %}
     <div class="flex-greybox320">
       <h1><a href="{% url 'scipost:about' %}">About SciPost</a></h1>
@@ -36,19 +36,19 @@
     </div>
 
     {% if not user.is_authenticated %}
-    <div class="flex-greybox320">
-      <h1><a href="{% url 'scipost:register' %}">Register</a></h1>
-      <p>Professional scientists (PhD students and above) can become Contributors to SciPost by filling the
-	<a href="{% url 'scipost:register' %}">registration form</a>.</p>
-      <h4>Registered contributors can among others:</h4>
-      <ul>
-	<li>Submit manuscripts to SciPost Journals</li>
-	<li>Post reports and comments</li>
-	<li>Express opinions on contributions</li>
-	<li>Subscribe to feeds</li>
-	<li>Use productivity tools</li>
-      </ul>
-    </div>
+      <div class="flex-greybox320">
+        <h1><a href="{% url 'scipost:register' %}">Register</a></h1>
+        <p>Professional scientists (PhD students and above) can become Contributors to SciPost by filling the
+      <a href="{% url 'scipost:register' %}">registration form</a>.</p>
+        <h4>Registered contributors can among others:</h4>
+        <ul>
+      <li>Submit manuscripts to SciPost Journals</li>
+      <li>Post reports and comments</li>
+      <li>Express opinions on contributions</li>
+      <li>Subscribe to feeds</li>
+      <li>Use productivity tools</li>
+        </ul>
+      </div>
     {% endif %}
 
     <div class="flex-greybox320">
@@ -75,16 +75,16 @@
       <h1><a href="{% url 'commentaries:commentaries' %}">Commentaries</a></h1>
       <p>SciPost Commentaries allow Contributors to comment and build on all existing literature.</p>
       <br/>
-      <!--
-      <h3>Search SciPost Commentaries:</h3>
-      <form action="{% url 'commentaries:commentaries' %}" method="post">
-	{% csrf_token %}
-	<table>
-	  {{ commentary_search_form.as_table }}
-	</table>
-	<input type="submit" name="Submit" />
-      </form>
-      -->
+      {#
+          <h3>Search SciPost Commentaries:</h3>
+          <form action="{% url 'commentaries:commentaries' %}" method="post">
+        {% csrf_token %}
+        <table>
+          {{ commentary_search_form.as_table }}
+        </table>
+        <input type="submit" name="Submit" />
+          </form>
+      #}
       <h3><a href="{% url 'commentaries:howto' %}">SciPost Commentaries how-to</a></h3>
       <h3><a href="{% url 'commentaries:request_commentary' %}">Request a new Commentary Page</a></h3>
     </div>
@@ -92,16 +92,16 @@
       <h1><a href="{% url 'theses:theses' %}">Theses</a></h1>
       <p>SciPost Theses allow Contributors to find Master's, Ph.D. and Habilitation theses relevant to their work.</p>
       <br/>
-      <!--
-      <h3>Search SciPost Theses:</h3>
-      <form action="{% url 'theses:theses' %}" method="post">
-	{% csrf_token %}
-	<table>
-	  {{ thesislink_search_form.as_table }}
-	</table>
-	<input type="submit" name="Submit" />
-      </form>
-      -->
+      {#
+          <h3>Search SciPost Theses:</h3>
+          <form action="{% url 'theses:theses' %}" method="post">
+        {% csrf_token %}
+        <table>
+          {{ thesislink_search_form.as_table }}
+        </table>
+        <input type="submit" name="Submit" />
+          </form>
+      #}
       <h3><a href="{% url 'theses:request_thesislink' %}">Request a new Thesis Link</a></h3>
     </div>
   </div>
diff --git a/scipost/templates/scipost/list_contents.html b/scipost/templates/scipost/list_contents.html
index 12597bdeb..8d4f05232 100644
--- a/scipost/templates/scipost/list_contents.html
+++ b/scipost/templates/scipost/list_contents.html
@@ -1,85 +1,85 @@
 
 {% if not "change_list" in list_perms %}
 
-{{ list.contents }}
+  {{ list.contents }}
 
 {% else %}
 
-<p>Description:
-<p>{{ list.description }}</p>
-</p>
+  <p>Description:
+  <p>{{ list.description }}</p>
+  </p>
 
 
-<hr class="hr6"/>
+  <hr class="hr6"/>
 
-{% if list.submissions.exists or list.commentaries.exists or list.thesislinks.exists or list.comments.exists %}
+  {% if list.submissions.exists or list.commentaries.exists or list.thesislinks.exists or list.comments.exists %}
 
-{% if list.submissions.exists %}
-<p>Submissions:
-  <ul>
-    {% for sub in list.submissions.all %}
-    {{ sub.simple_header_as_li }}
-    {% if "change_list" in list_perms %}
-    <form action="{% url 'scipost:list_remove_element' list_id=list.id type='S' element_id=sub.id %}" method="post">
-      {% csrf_token %}
-      <input class="RemoveItemFromList" type="submit" value="Remove"/>
-    </form>
+    {% if list.submissions.exists %}
+    <p>Submissions:
+      <ul>
+        {% for sub in list.submissions.all %}
+          {{ sub.simple_header_as_li }}
+          {% if "change_list" in list_perms %}
+            <form action="{% url 'scipost:list_remove_element' list_id=list.id type='S' element_id=sub.id %}" method="post">
+              {% csrf_token %}
+              <input class="RemoveItemFromList" type="submit" value="Remove"/>
+            </form>
+          {% endif %}
+        {% endfor %}
+      </ul>
+    </p>
     {% endif %}
-    {% endfor %}
-  </ul>
-</p>
-{% endif %}
 
-{% if list.commentaries.exists %}
-<p>Commentaries:
-  <ul>
-    {% for com in list.commentaries.all %}
-    {{ com.simple_header_as_li }}
-    {% if "change_list" in list_perms %}
-    <form action="{% url 'scipost:list_remove_element' list_id=list.id type='C' element_id=com.id %}" method="post">
-      {% csrf_token %}
-      <input class="RemoveItemFromList" type="submit" value="Remove"/>
-    </form>
+    {% if list.commentaries.exists %}
+      <p>Commentaries:
+        <ul>
+          {% for com in list.commentaries.all %}
+            {{ com.simple_header_as_li }}
+            {% if "change_list" in list_perms %}
+              <form action="{% url 'scipost:list_remove_element' list_id=list.id type='C' element_id=com.id %}" method="post">
+                {% csrf_token %}
+                <input class="RemoveItemFromList" type="submit" value="Remove"/>
+              </form>
+            {% endif %}
+          {% endfor %}
+        </ul>
+      </p>
     {% endif %}
-    {% endfor %}
-  </ul>
-</p>
-{% endif %}
 
-{% if list.thesislinks.exists %}
-<p>Thesis links:
-  <ul>
-    {% for tl in list.thesislinks.all %}
-    {{ tl.simple_header_as_li }}
-    {% if "change_list" in list_perms %}
-    <form action="{% url 'scipost:list_remove_element' list_id=list.id type='T' element_id=tl.id %}" method="post">
-      {% csrf_token %}
-      <input class="RemoveItemFromList" type="submit" value="Remove"/>
-    </form>
+    {% if list.thesislinks.exists %}
+      <p>Thesis links:
+        <ul>
+          {% for tl in list.thesislinks.all %}
+            {{ tl.simple_header_as_li }}
+            {% if "change_list" in list_perms %}
+              <form action="{% url 'scipost:list_remove_element' list_id=list.id type='T' element_id=tl.id %}" method="post">
+                {% csrf_token %}
+                <input class="RemoveItemFromList" type="submit" value="Remove"/>
+              </form>
+            {% endif %}
+          {% endfor %}
+        </ul>
+      </p>
     {% endif %}
-    {% endfor %}
-  </ul>
-</p>
-{% endif %}
 
-{% if list.comments.exists %}
-<p>Comments:
-  <ul>
-    {% for comment in list.comments.all %}
-    {{ comment.simple_header_as_li }}
-    {% if "change_list" in list_perms %}
-    <form action="{% url 'scipost:list_remove_element' list_id=list.id type='c' element_id=comment.id %}" method="post">
-      {% csrf_token %}
-      <input class="RemoveItemFromList" type="submit" value="Remove"/>
-    </form>
+    {% if list.comments.exists %}
+      <p>Comments:
+        <ul>
+          {% for comment in list.comments.all %}
+            {{ comment.simple_header_as_li }}
+            {% if "change_list" in list_perms %}
+              <form action="{% url 'scipost:list_remove_element' list_id=list.id type='c' element_id=comment.id %}" method="post">
+                {% csrf_token %}
+                <input class="RemoveItemFromList" type="submit" value="Remove"/>
+              </form>
+            {% endif %}
+          {% endfor %}
+        </ul>
+      </p>
     {% endif %}
-    {% endfor %}
-  </ul>
-</p>
-{% endif %}
 
-{% else %}
-<br/><h3>This List is empty.</h3>
-{% endif %}
+  {% else %}
+    <br/><h3>This List is empty.</h3>
+  {% endif %}
 
 {% endif %}
diff --git a/scipost/views.py b/scipost/views.py
index 238cc4fea..5e76ab6a3 100644
--- a/scipost/views.py
+++ b/scipost/views.py
@@ -8,7 +8,6 @@ from django.utils import timezone
 from django.shortcuts import get_object_or_404, render
 from django.contrib.auth import authenticate, login, logout
 from django.contrib.auth.decorators import login_required
-#from django.contrib.auth.decorators import permission_required   # Superseded by guardian
 from django.contrib.auth.models import User, Group, Permission
 from django.contrib.auth.views import password_reset, password_reset_confirm
 from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist, PermissionDenied
-- 
GitLab