Preference changes is complete

Added the functions to change the preference and user settings
Merge branch 'danny'