Refresh menus on page changes and fix various bugs exposed by using functionality.