Lowered the minimum API

Also changed the settings into Fragment and fixed some bugs