method scan_module_elements m =
      List.iter 
        (fun ele -> 
          match ele with
            Odoc_module.Element_module m -> 
              let g_bak = current_group in
              let g = Tdl.group ~title: (Name.simple m.m_name) () in
              current_group <- g;
              g_bak.group_groups <- g_bak.group_groups @ [g];
              self#scan_module m;
              current_group <- g_bak
          | Odoc_module.Element_module_type mt -> 
              let g_bak = current_group in
              let g = Tdl.group ~title: (Name.simple mt.mt_name) () in
              current_group <- g;
              g_bak.group_groups <- g_bak.group_groups @ [g];
              self#scan_module_type mt;
              current_group <- g_bak
          | Odoc_module.Element_included_module im -> self#scan_included_module im
          | Odoc_module.Element_class c -> 
              let g_bak = current_group in
              let g = Tdl.group ~title: (Name.simple c.cl_name) () in
              current_group <- g;
              g_bak.group_groups <- g_bak.group_groups @ [g];
              self#scan_class c;
              current_group <- g_bak
          | Odoc_module.Element_class_type ct ->
              let g_bak = current_group in
              let g = Tdl.group ~title: (Name.simple ct.clt_name) () in
              current_group <- g;
              g_bak.group_groups <- g_bak.group_groups @ [g];
              self#scan_class_type ct;
              current_group <- g_bak
          | Odoc_module.Element_value v -> self#scan_value v
          | Odoc_module.Element_exception e -> self#scan_exception e
          | Odoc_module.Element_type t -> self#scan_type t
          | Odoc_module.Element_module_comment t -> self#scan_module_comment t
        )
        (Odoc_module.module_elements m)