How to create a blogs category page with Blog-Types Plugin

It looks like the original poster has not been around for awhile, but I am working on this same plugin trying to figure out a way to make it usable.
The developers have been saying for over a year that they are going to get around to up-dating this plugin, but for now you have to invent your own way to use it. In my searches A LOT of people have been asking how to do this:
So, here is what I have come up with so far. My PHP skills are minimal, so be short with your mockery and any feedback is very appreciated on how to make this more concise:

I wrote a function that can be placed in the functions.php file, and then you can use the function on any page template like so (just an example):

<h3 class="pagetitle">A List of Categories and Sites</h3>
<?php get_blog_types(); ?> 

and here is the function:

<?php 
 function get_blog_types() {

  global $wpdb , $blog_types , $blog_subtypes;

  //first I get all of the blog_type names
    foreach($blog_types as $blog_type){
       $blog_type_name = $blog_type['nicename'];
        $blogtypenames = $wpdb->get_results("SELECT blog_ID, blog_types FROM wp_blog_types where blog_types="|$blog_type_name|" ");      //echo the blog-type
            echo '<h3>';
            echo  $blog_type['name'];
            echo '</h3>';


            //Second I get the sites in each blog-type
            foreach( $blogtypenames as $blogtypename ) {

             //Third I get he names of those sites
           $sitename = $wpdb->get_results("SELECT option_value, blog_id FROM wp_".$blogtypename->blog_ID ."_options WHERE       option_name="blogname" ");

           foreach( $sitename as $name ) { 

           $blogs = $wpdb->get_results("SELECT domain,path FROM wp_blogs where blog_id = ". $blogtypename->blog_ID.""); 
        foreach( $blogs as $blog ) {        
            // Create bullet
            echo '<li>';
            echo '<a href="http://';
            echo $blog->domain;
            echo $blog -> path;
            echo '">';
            echo $blogtypename->blog_ID;
            echo $name->option_value;
            echo '</a></li>';
             }; //end fifth
            }; //end fourth
        }; //end third
     }; //end second

    } //end first
?>

I am going to work on it some more to include sub-types and probably just turn it into a plugin once I have it ironed out more, but I thought it would be helpful to get it out for anyone else messing with this.