Extended menu, misc

- added support for submenus in desktop menu
- code formatting