Change preferences to names and remove variable