updated MainActivity to use Switches for more up to date android
versions.