Refactor so datasources only access from MainActivity.