Extensible menus

I wanted to extend the existing tab menu to include some extra commands in the context menu and found that they were not extensible like the recents context menu. These changes fix that issue.