Refactor GCM provider.