Greatly improved the performance of the main menu.