Refactor 3 of the menu system.