Refactor menu selection a bit.