fixed pref headers errors and uncommenetd code
fixed compile errors
fixed pref name