Moved stuff from MainActivity to MainFragment