Submenu code added

Let me know how it works for you or if you notice any issues.