Improved support for menu switching, and added basic options menu for example.