Improved firstname selection and case insensitive gender detection