CHNAGED:sort of code clean up with Pref.h