some general simplification to modal, menus, etc
Merge pull request #1609 from awesomerobot/master

some general simplification to modal, menus, etc