diff --git a/blocks/navigation/renderer.php b/blocks/navigation/renderer.php
index d59f87c..a9fb685 100644
--- a/blocks/navigation/renderer.php
+++ b/blocks/navigation/renderer.php
@@ -70,7 +70,8 @@ class block_navigation_renderer extends plugin_renderer_base {
             }
             if ($isbranch) {
                 $liclasses[] = 'contains_branch';
-            } else if ($hasicon) {
+            }
+            if ($hasicon) {
                 $liclasses[] = 'item_with_icon';
             }
             if ($item->isactive === true) {
diff --git a/blocks/navigation/styles.css b/blocks/navigation/styles.css
index 8e204dd..9c0ac89 100644
--- a/blocks/navigation/styles.css
+++ b/blocks/navigation/styles.css
@@ -7,11 +7,11 @@
 .block_navigation .block_tree li ul {padding-left:0;margin:0;}
 .block_navigation .block_tree li.depth_2 ul {padding-left:16px;margin:0;}
 .block_navigation .block_tree .tree_item {padding-left: 18px;margin:3px 0px;text-align:left;}
+.block_navigation .block_tree .item_with_icon.contains_branch > .tree_item {padding-left:36px;}
+.block_navigation .block_tree .item_with_icon.contains_branch > .tree_item img {left:18px;}
 
 .block_navigation .block_tree .tree_item.branch {background-image: url([[pix:t/expanded]]);background-position: 0 10%;background-repeat: no-repeat;}
 .block_navigation .block_tree .tree_item.branch.navigation_node {background-image:none;padding-left:0;}
-.block_navigation .block_tree .type_activity > .tree_item.branch {background-image:none;position:relative;}
-.block_navigation .block_tree .type_activity > .tree_item.branch img {position:absolute;left:0;}
 .block_navigation .block_tree .root_node.leaf {padding-left:0px;}
 .block_navigation .block_tree .active_tree_node {font-weight:bold;}
 .block_navigation .block_tree .depth_1.current_branch ul {font-weight:normal;}
diff --git a/lib/navigationlib.php b/lib/navigationlib.php
index 3a62e6a..c4c84a0 100644
--- a/lib/navigationlib.php
+++ b/lib/navigationlib.php
@@ -1521,11 +1521,12 @@ class global_navigation extends navigation_node {
             if (function_exists($function)) {
                 $activtyrecord = $DB->get_record($cm->modname, array('id' => $cm->instance), '*', MUST_EXIST);
                 $function($activity, $course, $activtyrecord, $cm);
-                return true;
             }
+        } else {
+            $activity->nodetype = navigation_node::NODETYPE_LEAF;
         }
-        $activity->nodetype = navigation_node::NODETYPE_LEAF;
-        return false;
+
+        return ($activity->nodetype == navigation_node::NODETYPE_BRANCH);
     }
     /**
      * Loads user specific information into the navigation in the appopriate place.
diff --git a/mod/folder/lib.php b/mod/folder/lib.php
index 3cffd25..c9ae1bc 100644
--- a/mod/folder/lib.php
+++ b/mod/folder/lib.php
@@ -313,24 +313,4 @@ function folder_pluginfile($course, $cm, $context, $filearea, $args, $forcedownl
     // finally send the file
     // for folder module, we force download file all the time
     send_stored_file($file, 86400, 0, true);
-}
-
-/**
- * This function extends the global navigation for the site.
- * It is important to note that you should not rely on PAGE objects within this
- * body of code as there is no guarantee that during an AJAX request they are
- * available
- *
- * @param navigation_node $navigation The folder node within the global navigation
- * @param stdClass $course The course object returned from the DB
- * @param stdClass $module The module object returned from the DB
- * @param stdClass $cm The course module instance returned from the DB
- */
-function folder_extend_navigation($navigation, $course, $module, $cm) {
-    /**
-     * This is currently just a stub so that it can be easily expanded upon.
-     * When expanding just remove this comment and the line below and then add
-     * you content.
-     */
-    $navigation->nodetype = navigation_node::NODETYPE_LEAF;
-}
+}
\ No newline at end of file
diff --git a/mod/imscp/lib.php b/mod/imscp/lib.php
index 94dc67a..fd2e773 100644
--- a/mod/imscp/lib.php
+++ b/mod/imscp/lib.php
@@ -377,24 +377,4 @@ function imscp_pluginfile($course, $cm, $context, $filearea, $args, $forcedownlo
     } else {
         return false;
     }
-}
-
-/**
- * This function extends the global navigation for the site.
- * It is important to note that you should not rely on PAGE objects within this
- * body of code as there is no guarantee that during an AJAX request they are
- * available
- *
- * @param navigation_node $navigation The imscp node within the global navigation
- * @param stdClass $course The course object returned from the DB
- * @param stdClass $module The module object returned from the DB
- * @param stdClass $cm The course module instance returned from the DB
- */
-function imscp_extend_navigation($navigation, $course, $module, $cm) {
-    /**
-     * This is currently just a stub so that it can be easily expanded upon.
-     * When expanding just remove this comment and the line below and then add
-     * you content.
-     */
-    $navigation->nodetype = navigation_node::NODETYPE_LEAF;
-}
+}
\ No newline at end of file
diff --git a/mod/lesson/lib.php b/mod/lesson/lib.php
index 3bfaa41..b6c8cc7 100644
--- a/mod/lesson/lib.php
+++ b/mod/lesson/lib.php
@@ -771,26 +771,6 @@ function lesson_supports($feature) {
 }
 
 /**
- * This function extends the global navigation for the site.
- * It is important to note that you should not rely on PAGE objects within this
- * body of code as there is no guarantee that during an AJAX request they are
- * available
- *
- * @param navigation_node $navigation The lesson node within the global navigation
- * @param stdClass $course The course object returned from the DB
- * @param stdClass $module The module object returned from the DB
- * @param stdClass $cm The course module instance returned from the DB
- */
-function lesson_extend_navigation($navigation, $course, $module, $cm) {
-    /**
-     * This is currently just a stub so  that it can be easily expanded upon.
-     * When expanding just remove this comment and the line below and then add
-     * you content.
-     */
-    $navigation->nodetype = navigation_node::NODETYPE_LEAF;
-}
-
-/**
  * This function extends the settings navigation block for the site.
  *
  * It is safe to rely on PAGE here as we will only ever be within the module
diff --git a/mod/page/lib.php b/mod/page/lib.php
index ce8aef1..770430d 100644
--- a/mod/page/lib.php
+++ b/mod/page/lib.php
@@ -380,25 +380,4 @@ function page_pluginfile($course, $cm, $context, $filearea, $args, $forcedownloa
 
     // finally send the file
     send_stored_file($file, 86400, 0, $forcedownload);
-}
-
-
-/**
- * This function extends the global navigation for the site.
- * It is important to note that you should not rely on PAGE objects within this
- * body of code as there is no guarantee that during an AJAX request they are
- * available
- *
- * @param navigation_node $navigation The page node within the global navigation
- * @param stdClass $course The course object returned from the DB
- * @param stdClass $module The module object returned from the DB
- * @param stdClass $cm The course module instance returned from the DB
- */
-function page_extend_navigation($navigation, $course, $module, $cm) {
-    /**
-     * This is currently just a stub so that it can be easily expanded upon.
-     * When expanding just remove this comment and the line below and then add
-     * you content.
-     */
-    $navigation->nodetype = navigation_node::NODETYPE_LEAF;
-}
+}
\ No newline at end of file
diff --git a/mod/scorm/lib.php b/mod/scorm/lib.php
old mode 100755
new mode 100644
index 6c985f8..91e1903
--- a/mod/scorm/lib.php
+++ b/mod/scorm/lib.php
@@ -929,26 +929,6 @@ function scorm_supports($feature) {
 }
 
 /**
- * This function extends the global navigation for the site.
- * It is important to note that you should not rely on PAGE objects within this
- * body of code as there is no guarantee that during an AJAX request they are
- * available
- *
- * @param navigation_node $navigation The scorm node within the global navigation
- * @param stdClass $course The course object returned from the DB
- * @param stdClass $module The module object returned from the DB
- * @param stdClass $cm The course module instance returned from the DB
- */
-function scorm_extend_navigation($navigation, $course, $module, $cm) {
-    /**
-     * This is currently just a stub so that it can be easily expanded upon.
-     * When expanding just remove this comment and the line below and then add
-     * you content.
-     */
-    $navigation->nodetype = navigation_node::NODETYPE_LEAF;
-}
-
-/**
  * Get the filename for a temp log file
  *
  * @param string $type - type of log(aicc,scorm12,scorm13) used as prefix for filename
diff --git a/mod/survey/lib.php b/mod/survey/lib.php
index fce3534..6fc71ac 100644
--- a/mod/survey/lib.php
+++ b/mod/survey/lib.php
@@ -809,26 +809,6 @@ function survey_supports($feature) {
 }
 
 /**
- * This fucntion extends the global navigation for the site.
- * It is important to note that you should not rely on PAGE objects within this
- * body of code as there is no guarantee that during an AJAX request they are
- * available
- *
- * @param navigation_node $navigation The quiz node within the global navigation
- * @param stdClass $course The course object returned from the DB
- * @param stdClass $module The module object returned from the DB
- * @param stdClass $cm The course module instance returned from the DB
- */
-function survey_extend_navigation($navigation, $course, $module, $cm) {
-    /**
-     * This is currently just a stub so  that it can be easily expanded upon.
-     * When expanding just remove this comment and the line below and then add
-     * you content.
-     */
-    $navigation->nodetype = navigation_node::NODETYPE_LEAF;
-}
-
-/**
  * This function extends the settings navigation block for the site.
  *
  * It is safe to rely on PAGE here as we will only ever be within the module
diff --git a/mod/url/lib.php b/mod/url/lib.php
index f79913b..3c5f30f 100644
--- a/mod/url/lib.php
+++ b/mod/url/lib.php
@@ -288,24 +288,4 @@ function url_get_coursemodule_info($coursemodule) {
     }
 
     return $info;
-}
-
-/**
- * This function extends the global navigation for the site.
- * It is important to note that you should not rely on PAGE objects within this
- * body of code as there is no guarantee that during an AJAX request they are
- * available
- *
- * @param navigation_node $navigation The url node within the global navigation
- * @param stdClass $course The course object returned from the DB
- * @param stdClass $module The module object returned from the DB
- * @param stdClass $cm The course module instance returned from the DB
- */
-function url_extend_navigation($navigation, $course, $module, $cm) {
-    /**
-     * This is currently just a stub so that it can be easily expanded upon.
-     * When expanding just remove this comment and the line below and then add
-     * you content.
-     */
-    $navigation->nodetype = navigation_node::NODETYPE_LEAF;
 }
\ No newline at end of file
