updated code to reflect changes in push notifications, and upgraded rails versions, etc