Essays on Group Identity and Social Preferences