Refactor GCM provier.