GIS Dev,
I have a Beta version right now that does all of it in the widget. This link is to the compiled widget, but if you want to test it out I would appreciate and input.
http://forums.arcgis.com/threads/75331-Legend-Widget-not-Refreshing?p=267156&viewfull=1#post267156
The layers in the TOC are in the reverse order that they are listed in the main config.xml.
So, the first layer listed under <operationallayers> will be at the bottom of the TOC, the last layer in the <operationallayers> section will be at the top of the TOC.
R_