Modifying gcm to take advantage of web workers.