Fixed wrong-way-around test for null on push subscription, made a couple more things local that could be, removed some unused local variables and an unused initial value.