Race menu: refactored some code into a new TabManager class.