removed deprecated use of addPreferencesFromResource and added PreferenceFragment in its place
general code cleanup