Updated the plugin dependency sorting, so it now at least works.  But, there are quite a few problems.