diff --git a/edit.php b/edit.php
index 45f6b4a..aca8a5f 100644
--- a/edit.php
+++ b/edit.php
@@ -17,8 +17,7 @@
 /**
  * Rubric editor page
  *
- * @package    gradingform
- * @subpackage guide
+ * @package    gradingform_guide
  * @copyright  2012 Dan Marsden <dan@danmarsden.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
diff --git a/edit_form.php b/edit_form.php
index 426a881..613a0c0 100644
--- a/edit_form.php
+++ b/edit_form.php
@@ -17,8 +17,7 @@
 /**
  * The form used at the guide editor page is defined here
  *
- * @package    gradingform
- * @subpackage guide
+ * @package    gradingform_guide
  * @copyright  2012 Dan Marsden <dan@danmarsden.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
@@ -32,6 +31,10 @@ MoodleQuickForm::registerElementType('guideeditor', $CFG->dirroot.'/grade/gradin
 
 /**
  * Defines the guide edit form
+ *
+ * @package    gradingform_guide
+ * @copyright  2012 Dan Marsden <dan@danmarsden.com>
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class gradingform_guide_editguide extends moodleform {
 
diff --git a/guideeditor.php b/guideeditor.php
index 9077006..add8c2e 100644
--- a/guideeditor.php
+++ b/guideeditor.php
@@ -15,8 +15,7 @@
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
 /**
- * @package    gradingform
- * @subpackage guide
+ * @package    gradingform_guide
  * @copyright  2012 Dan Marsden <dan@danmarsden.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
@@ -25,6 +24,11 @@ defined('MOODLE_INTERNAL') || die();
 
 require_once("HTML/QuickForm/input.php");
 
+/**
+ * @package    gradingform_guide
+ * @copyright  2012 Dan Marsden <dan@danmarsden.com>
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 class moodlequickform_guideeditor extends HTML_QuickForm_input {
     /** help message */
     public $_helpbutton = '';
@@ -37,7 +41,12 @@ class moodlequickform_guideeditor extends HTML_QuickForm_input {
     /** Message to display in front of the editor (that there exist grades on this guide being edited) */
     protected $regradeconfirmation = false;
 
-    function moodlequickform_guideeditor($elementname=null, $elementlabel=null, $attributes=null) {
+    /**
+     * @param string $elementname
+     * @param string $elementlabel
+     * @param array $attributes
+     */
+    public function moodlequickform_guideeditor($elementname=null, $elementlabel=null, $attributes=null) {
         parent::HTML_QuickForm_input($elementname, $elementlabel, $attributes);
     }
 
diff --git a/lang/en/gradingform_guide.php b/lang/en/gradingform_guide.php
index 2716640..ca9e608 100644
--- a/lang/en/gradingform_guide.php
+++ b/lang/en/gradingform_guide.php
@@ -15,8 +15,7 @@
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
 /**
- * @package    gradingform
- * @subpackage guide
+ * @package    gradingform_guide
  * @copyright  2012 Dan Marsden <dan@danmarsden.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
diff --git a/lib.php b/lib.php
index ab9ab93..8c688d5 100644
--- a/lib.php
+++ b/lib.php
@@ -17,9 +17,7 @@
 /**
  * Grading method controller for the guide plugin
  *
- * @package    gradingform
- * @subpackage guide
- * @copyright  2011 David Mudrak <david@moodle.com>
+ * @package    gradingform_guide
  * @copyright  2012 Dan Marsden <dan@danmarsden.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
@@ -30,6 +28,10 @@ require_once($CFG->dirroot.'/grade/grading/form/lib.php');
 
 /**
  * This controller encapsulates the guide grading logic
+ *
+ * @package    gradingform_guide
+ * @copyright  2012 Dan Marsden <dan@danmarsden.com>
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class gradingform_guide_controller extends gradingform_controller {
     // Modes of displaying the guide (used in gradingform_guide_renderer)
@@ -53,6 +55,7 @@ class gradingform_guide_controller extends gradingform_controller {
     /** @var stdClass|false the definition structure */
     protected $moduleinstance = array();
 
+    /** @var array An array of validation errors */
     protected $validationerrors = array();
 
     /**
@@ -79,6 +82,7 @@ class gradingform_guide_controller extends gradingform_controller {
      *
      * @param global_navigation $navigation {@link global_navigation}
      * @param navigation_node $node {@link navigation_node}
+     * @return void
      */
     public function extend_navigation(global_navigation $navigation, navigation_node $node=null) {
         if (has_capability('moodle/grade:managegradingforms', $this->get_context())) {
@@ -97,7 +101,7 @@ class gradingform_guide_controller extends gradingform_controller {
      *
      * @see parent::update_definition()
      * @param stdClass $newdefinition guide definition data as coming from gradingform_guide_editguide::get_data()
-     * @param int|null $usermodified optional userid of the author of the definition, defaults to the current user
+     * @param int $usermodified optional userid of the author of the definition, defaults to the current user
      */
     public function update_definition(stdClass $newdefinition, $usermodified = null) {
         $this->update_or_check_guide($newdefinition, $usermodified, true);
@@ -108,6 +112,7 @@ class gradingform_guide_controller extends gradingform_controller {
 
     /**
      * Either saves the guide definition into the database or check if it has been changed.
+     *
      * Returns the level of changes:
      * 0 - no changes
      * 1 - only texts or criteria sortorders are changed, students probably do not require re-grading
@@ -118,8 +123,8 @@ class gradingform_guide_controller extends gradingform_controller {
      *
      * @param stdClass $newdefinition guide definition data as coming from gradingform_guide_editguide::get_data()
      * @param int|null $usermodified optional userid of the author of the definition, defaults to the current user
-     * @param boolean $doupdate if true actually updates DB, otherwise performs a check
-     *
+     * @param bool $doupdate if true actually updates DB, otherwise performs a check
+     * @return int
      */
     public function update_or_check_guide(stdClass $newdefinition, $usermodified = null, $doupdate = false) {
         global $DB;
@@ -382,7 +387,7 @@ class gradingform_guide_controller extends gradingform_controller {
     /**
      * Converts the current definition into an object suitable for the editor form's set_data()
      *
-     * @param boolean $addemptycriterion whether to add an empty criterion if the guide is completely empty (just being created)
+     * @param bool $addemptycriterion whether to add an empty criterion if the guide is completely empty (just being created)
      * @return stdClass
      */
     public function get_definition_for_editing($addemptycriterion = false) {
@@ -445,7 +450,7 @@ class gradingform_guide_controller extends gradingform_controller {
     /**
      * Options for displaying the guide description field in the form
      *
-     * @param object $context
+     * @param context $context
      * @return array options for the form description field
      */
     public static function description_form_field_options($context) {
@@ -577,7 +582,7 @@ class gradingform_guide_controller extends gradingform_controller {
      * @param int $itemid
      * @param array $gradinginfo result of function grade_get_grades
      * @param string $defaultcontent default string to be returned if no active grading is found
-     * @param boolean $cangrade whether current user has capability to grade in this context
+     * @param bool $cangrade whether current user has capability to grade in this context
      * @return string
      */
     public function render_grade($page, $itemid, $gradinginfo, $defaultcontent, $cangrade) {
@@ -604,7 +609,9 @@ class gradingform_guide_controller extends gradingform_controller {
      * with other conditions using the OR operator.
      *
      * @param string $token token to search for
-     * @return array
+     * @return array An array containing two more arrays
+     *     Array of search SQL fragments
+     *     Array of params for the search fragments
      */
     public static function sql_search_where($token) {
         global $DB;
@@ -650,10 +657,13 @@ class gradingform_guide_controller extends gradingform_controller {
  * Class to manage one guide grading instance. Stores information and performs actions like
  * update, copy, validate, submit, etc.
  *
- * @copyright  2011 Marina Glancy
+ * @package    gradingform_guide
+ * @copyright  2012 Dan Marsden <dan@danmarsden.com>
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class gradingform_guide_instance extends gradingform_instance {
 
+    /** @var array */
     protected $guide;
 
     /**
@@ -714,7 +724,7 @@ class gradingform_guide_instance extends gradingform_instance {
     /**
      * Retrieves from DB and returns the data how this guide was filled
      *
-     * @param boolean $force whether to force DB query even if the data is cached
+     * @param bool $force whether to force DB query even if the data is cached
      * @return array
      */
     public function get_guide_filling($force = false) {
@@ -803,7 +813,7 @@ class gradingform_guide_instance extends gradingform_instance {
      * Returns html for form element of type 'grading'.
      *
      * @param moodle_page $page
-     * @param MoodleQuickForm_grading $formelement
+     * @param MoodleQuickForm_grading $gradingformelement
      * @return string
      */
     public function render_grading_element($page, $gradingformelement) {
@@ -869,4 +879,4 @@ class gradingform_guide_instance extends gradingform_instance {
             $gradingformelement->getName(), $value, $this->validationerrors);
         return $html;
     }
-}
+}
\ No newline at end of file
diff --git a/renderer.php b/renderer.php
index a4a7287..5ce827c 100644
--- a/renderer.php
+++ b/renderer.php
@@ -15,8 +15,9 @@
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
 /**
- * @package    gradingform
- * @subpackage guide
+ * Contains the Guide grading form renderer in all of its glory
+ *
+ * @package    gradingform_guide
  * @copyright  2012 Dan Marsden <dan@danmarsden.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
@@ -25,6 +26,10 @@ defined('MOODLE_INTERNAL') || die();
 
 /**
  * Grading method plugin renderer
+ *
+ * @package    gradingform_guide
+ * @copyright  2012 Dan Marsden <dan@danmarsden.com>
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class gradingform_guide_renderer extends plugin_renderer_base {
 
@@ -43,11 +48,13 @@ class gradingform_guide_renderer extends plugin_renderer_base {
      * Also JavaScript relies on the class names of elements and when developer changes them
      * script might stop working.
      *
-     * @param int $mode guide display mode @see gradingform_guide_controller
+     * @param int $mode guide display mode, one of gradingform_guide_controller::DISPLAY_* {@see gradingform_guide_controller}
+     * @param array $options An array of options.
+     *      showmarkspercriterionstudents (bool) If true adds the current score to the display
      * @param string $elementname the name of the form element (in editor mode) or the prefix for div ids (in view mode)
-     * @param array|null $criterion criterion data
-     * @param string $levelsstr evaluated templates for this criterion levels
-     * @param array|null $value (only in view mode) teacher's feedback on this criterion
+     * @param array $criterion criterion data
+     * @param array $value (only in view mode) teacher's feedback on this criterion
+     * @param array $validationerrors An array containing validation errors to be shown
      * @return string
      */
     public function criterion_template($mode, $options, $elementname = '{NAME}', $criterion = null, $value = null, $validationerrors = null) {
@@ -221,11 +228,9 @@ class gradingform_guide_renderer extends plugin_renderer_base {
      * Also JavaScript relies on the class names of elements and when developer changes them
      * script might stop working.
      *
-     * @param int $mode guide display mode @see gradingform_guide_controller
+     * @param int $mode guide display mode, one of gradingform_guide_controller::DISPLAY_* {@see gradingform_guide_controller}
      * @param string $elementname the name of the form element (in editor mode) or the prefix for div ids (in view mode)
-     * @param array|null $criterion criterion data
-     * @param string $levelsstr evaluated templates for this criterion levels
-     * @param array|null $value (only in view mode) teacher's feedback on this criterion
+     * @param array $comment
      * @return string
      */
     public function comment_template($mode, $elementname = '{NAME}', $comment = null) {
@@ -299,9 +304,11 @@ class gradingform_guide_renderer extends plugin_renderer_base {
      * Also JavaScript relies on the class names of elements and when developer changes them
      * script might stop working.
      *
-     * @param int $mode guide display mode @see gradingform_guide_controller
+     * @param int $mode guide display mode, one of gradingform_guide_controller::DISPLAY_* {@see gradingform_guide_controller}
+     * @param array $options An array of options provided to {@see gradingform_guide_renderer::guide_edit_options()}
      * @param string $elementname the name of the form element (in editor mode) or the prefix for div ids (in view mode)
      * @param string $criteriastr evaluated templates for this guide's criteria
+     * @param string $commentstr
      * @return string
      */
     protected function guide_template($mode, $options, $elementname, $criteriastr, $commentstr) {
@@ -363,7 +370,7 @@ class gradingform_guide_renderer extends plugin_renderer_base {
      * Generates html template to view/edit the guide options. Expression {NAME} is used in
      * template for the form element name
      *
-     * @param int $mode
+     * @param int $mode guide display mode, one of gradingform_guide_controller::DISPLAY_* {@see gradingform_guide_controller}
      * @param array $options
      * @return string
      */
@@ -434,9 +441,12 @@ class gradingform_guide_renderer extends plugin_renderer_base {
      * guide_template
      *
      * @param array $criteria data about the guide design
-     * @param int $mode guide display mode @see gradingform_guide_controller
+     * @param array $comments
+     * @param array $options
+     * @param int $mode guide display mode, one of gradingform_guide_controller::DISPLAY_* {@see gradingform_guide_controller}
      * @param string $elementname the name of the form element (in editor mode) or the prefix for div ids (in view mode)
      * @param array $values evaluation result
+     * @param array $validationerrors
      * @return string
      */
     public function display_guide($criteria, $comments, $options, $mode, $elementname = null, $values = null, $validationerrors = null) {
@@ -521,7 +531,7 @@ class gradingform_guide_renderer extends plugin_renderer_base {
         if ($idx == $maxidx) {
             $class .= ' last';
         }
-        if ($idx%2) {
+        if ($idx % 2) {
             $class .= ' odd';
         } else {
             $class .= ' even';
@@ -534,7 +544,7 @@ class gradingform_guide_renderer extends plugin_renderer_base {
      *
      * @param array $instances array of objects of type gradingform_rubric_instance
      * @param string $defaultcontent default string that would be displayed without advanced grading
-     * @param boolean $cangrade whether current user has capability to grade in this context
+     * @param bool $cangrade whether current user has capability to grade in this context
      * @return string
      */
     public function display_instances($instances, $defaultcontent, $cangrade) {
@@ -554,8 +564,8 @@ class gradingform_guide_renderer extends plugin_renderer_base {
      * Displays one grading instance
      *
      * @param gradingform_rubric_instance $instance
-     * @param int idx unique number of instance on page
-     * @param boolean $cangrade whether current user has capability to grade in this context
+     * @param int $idx unique number of instance on page
+     * @param bool $cangrade whether current user has capability to grade in this context
      */
     public function display_instance(gradingform_guide_instance $instance, $idx, $cangrade) {
         $criteria = $instance->get_controller()->get_definition()->guide_criteria;
@@ -573,6 +583,14 @@ class gradingform_guide_renderer extends plugin_renderer_base {
     }
 
 
+    /**
+     * Displays a confirmation message after a regrade has occured
+     *
+     * @param string $elementname
+     * @param int $changelevel
+     * @param int $value The regrade option that was used
+     * @return string
+     */
     public function display_regrade_confirmation($elementname, $changelevel, $value) {
         $html = html_writer::start_tag('div', array('class' => 'gradingform_guide-regrade'));
         if ($changelevel<=2) {
@@ -607,4 +625,4 @@ class gradingform_guide_renderer extends plugin_renderer_base {
 
         return $html;
     }
-}
+}
\ No newline at end of file
diff --git a/version.php b/version.php
index 46e96bf..e235f71 100644
--- a/version.php
+++ b/version.php
@@ -15,8 +15,7 @@
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
 /**
- * @package    gradingform
- * @subpackage guide
+ * @package    gradingform_guide
  * @copyright  2012 Dan Marsden <dan@danmarsden.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
