overhaul of preferences class