Make the preferences section more generic