GCM registering refactored