Commenting some of the higher level functions having to do with switching modes and user menus.