Refactored game selection code.