Submenu support

Completely rewritten the plugin to support sub menus, as well as namespacing for more control over event handling.