Move preferences header creation to function