Added gender selection and fixed bugs