Changed MainActivity to be compatible with FragmentActivity