applied function pattern in GCMclient, added payloadMessage and
sendToSyncMessage.