Add PreferencesFragment as non inner class
Add Apache License 2.0