Move ping code out of the app delegate and into a Ping Controller.