Modify PreferenceController and combined it to main