Cleaned up code for selection menu.