Improved build script

Moved some stuff from AndroidManifest.xml to build.gradle and simplified
the SettingsFragment