diff --git a/classes/output/answermenu.php b/classes/output/answermenu.php
index 72b3c04138f14e472f33d879d9dd13719dae7281..b84d9e1b46db2463c0c74d61adb49f5e7255ec36 100644
--- a/classes/output/answermenu.php
+++ b/classes/output/answermenu.php
@@ -15,9 +15,7 @@
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
 /**
- * The purpose of this script is to collect the output data for the statistic template and
- * make it available to the renderer. The data is collected via the statistic model and then processed.
- * Therefore, class statistic can be seen as a view controller.
+ * Dropdown menu in answerstable on overview tab.
  *
  * @package   mod_pdfannotator
  * @copyright 2018 RWTH Aachen (see README.md)
@@ -33,6 +31,16 @@ class answermenu implements \renderable, \templatable {
     private $label;
     private $buttonclass;
 
+    /**
+     * Constructor of renderable for dropdown menu in answerstable.
+     * @global type $CFG
+     * @param int $annotationid Id of the annotation the answer belongs to
+     * @param bool $issubscribed Is the user subscribed to the question?
+     * @param int $cmid Course module id
+     * @param int $currentpage Page of the table on overviewpage
+     * @param int $itemsperpage Number of entries on every page in the table
+     * @param int $answerfilter Value of the filter for the answerstable
+     */
     public function __construct($annotationid, $issubscribed, $cmid, $currentpage, $itemsperpage, $answerfilter) {
 
         global $CFG;
diff --git a/classes/output/comment.php b/classes/output/comment.php
index d90da9c58eb8ef1784261eda1be0ceacd12eb8aa..42cd44d05238730f497e5031ecf63e867d2f3fb7 100644
--- a/classes/output/comment.php
+++ b/classes/output/comment.php
@@ -15,9 +15,7 @@
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
 /**
- * The purpose of this script is to collect the output data for the statistic template and
- * make it available to the renderer. The data is collected via the statistic model and then processed.
- * Therefore, class statistic can be seen as a view controller.
+ * Renderable for comments.
  *
  * @package   mod_pdfannotator
  * @copyright 2018 RWTH Aachen (see README.md)
@@ -30,6 +28,14 @@ class comment implements \renderable, \templatable {
 
     private $comments = [];
 
+    /**
+     * Constructor of renderable for comments.
+     *
+     * @param object $data Comment or array of comments
+     * @param object $cm Course module
+     * @param object $context Context
+     * @return type
+     */
     public function __construct($data, $cm, $context) {
         global $USER;
 
diff --git a/classes/output/questionmenu.php b/classes/output/questionmenu.php
index 417143615bded605551f85160d9231cf3c96a156..69691721756d8ec1ec60c1cfc2d1f659deb89014 100644
--- a/classes/output/questionmenu.php
+++ b/classes/output/questionmenu.php
@@ -15,9 +15,7 @@
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
 /**
- * The purpose of this script is to collect the output data for the statistic template and
- * make it available to the renderer. The data is collected via the statistic model and then processed.
- * Therefore, class statistic can be seen as a view controller.
+ * Dropdown menu in questionstable on overview tab.
  *
  * @package   mod_pdfannotator
  * @copyright 2018 RWTH Aachen (see README.md)
@@ -33,6 +31,12 @@ class questionmenu implements \renderable, \templatable {
     private $label;
     private $buttonclass;
 
+    /**
+     * Constructor of renderable for dropdown menu in questionstable.
+     *
+     * @param int $commentid Id of the question
+     * @param array $urlparams Parameters for the link
+     */
     public function __construct($commentid, $urlparams) {
 
         global $CFG;
diff --git a/classes/output/reportmenu.php b/classes/output/reportmenu.php
index 16aaa1c2d2bbfb144514eefd9ce454c9974cc7e9..0933c6be06fb37a61a4d1ca3edb7ef9234a51a3b 100644
--- a/classes/output/reportmenu.php
+++ b/classes/output/reportmenu.php
@@ -15,9 +15,7 @@
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
 /**
- * The purpose of this script is to collect the output data for the statistic template and
- * make it available to the renderer. The data is collected via the statistic model and then processed.
- * Therefore, class statistic can be seen as a view controller.
+ * Dropdown menu in reportstable on overview tab.
  *
  * @package   mod_pdfannotator
  * @copyright 2018 RWTH Aachen (see README.md)
@@ -32,6 +30,15 @@ class reportmenu implements \renderable, \templatable {
     private $iconclass;
     private $label;
 
+    /**
+     * Constructor of renderable for dropdown menu in reportstable.
+     * @global type $CFG
+     * @param object $report Report object
+     * @param int $cmid Course module id
+     * @param int $currentpage Page of the table on overviewpage
+     * @param int $itemsperpage Number of entries on every page in the table
+     * @param int $reportfilter Value of the filter for the answerstable
+     */
     public function __construct($report, $cmid, $currentpage, $itemsperpage, $reportfilter) {
         global $CFG;
         if ($report->seen == 0) {
diff --git a/classes/output/statistics.php b/classes/output/statistics.php
index da505d8376c7b576da42c8a517f552321349c40e..d8b9983f3fa823e3bfdcf35623d16d5d312082e3 100644
--- a/classes/output/statistics.php
+++ b/classes/output/statistics.php
@@ -35,6 +35,15 @@ class statistics implements \renderable, \templatable {
     private $isteacher;
     private $tabledata;
 
+    /**
+     * Constructor of renderable for statistics tab.
+     * @global type $USER
+     * @global type $PAGE
+     * @param int $annotatorid Id of the annotator
+     * @param int $courseid ID of the course
+     * @param object $capabilities Some of the capabilities the user has-
+     * @param int $id Course module id
+     */
     public function __construct($annotatorid, $courseid, $capabilities, $id) {
         global $USER, $PAGE;
         $userid = $USER->id;
diff --git a/db/upgrade.php b/db/upgrade.php
index 52e8ab777368b95b1eaa506c0cafb8a8b580392d..fef53934aaae032b8fd509dbe3d69554600ca356 100644
--- a/db/upgrade.php
+++ b/db/upgrade.php
@@ -440,7 +440,7 @@ function xmldb_pdfannotator_upgrade($oldversion) {
         }
 
         // Pdfannotator savepoint reached.
-        upgrade_mod_savepoint(true, 2018111602, 'pdfannotator');
+        upgrade_mod_savepoint(true, 2018092400, 'pdfannotator');
     }
 
     if ($oldversion < 2018103000) {
@@ -455,21 +455,6 @@ function xmldb_pdfannotator_upgrade($oldversion) {
         upgrade_mod_savepoint(true, 2018103000, 'pdfannotator');
     }
 
-    if ($oldversion < 2018112203) {
-
-        // Define field solved to be added to pdfannotator_comments.
-        $table = new xmldb_table('pdfannotator_comments');
-        $field = new xmldb_field('solved', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0', 'seen');
-
-        // Conditionally launch add field solved.
-        if (!$dbman->field_exists($table, $field)) {
-            $dbman->add_field($table, $field);
-        }
-
-        // Pdfannotator savepoint reached.
-        upgrade_mod_savepoint(true, 2018112203, 'pdfannotator');
-    }
-
     if ($oldversion < 2018111901) {
 
         // Changing the default of field useprint on table pdfannotator to 0.
@@ -485,6 +470,21 @@ function xmldb_pdfannotator_upgrade($oldversion) {
         upgrade_mod_savepoint(true, 2018111901, 'pdfannotator');
     }
 
+    if ($oldversion < 2018112203) {
+
+        // Define field solved to be added to pdfannotator_comments.
+        $table = new xmldb_table('pdfannotator_comments');
+        $field = new xmldb_field('solved', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0', 'seen');
+
+        // Conditionally launch add field solved.
+        if (!$dbman->field_exists($table, $field)) {
+            $dbman->add_field($table, $field);
+        }
+
+        // Pdfannotator savepoint reached.
+        upgrade_mod_savepoint(true, 2018112203, 'pdfannotator');
+    }
+
     if ($oldversion < 2018112100) {
 
         // Define field modifiedby to be added to pdfannotator_annotations.
@@ -559,8 +559,8 @@ function xmldb_pdfannotator_upgrade($oldversion) {
         // Pdfannotator savepoint reached.
         upgrade_mod_savepoint(true, 2019060300, 'pdfannotator');
     }
-    
-        if ($oldversion < 2019070100) {
+
+    if ($oldversion < 2019070100) {
 
         // Define field useprintcomments to be added to pdfannotator.
         $table = new xmldb_table('pdfannotator');